--- contrib/ntp/COPYRIGHT.orig
+++ contrib/ntp/COPYRIGHT
@@ -3,7 +3,7 @@
 
    jpg "Clone me," says Dolly sheepishly.
 
-   Last update: 2-Jan-2017 11:58 UTC
+   Last update: 4-Feb-2020 23:47 UTC
      __________________________________________________________________
 
    The following copyright notice applies to all files collectively called
@@ -32,7 +32,7 @@
    Burnicki is:
 ***********************************************************************
 *                                                                     *
-* Copyright (c) Network Time Foundation 2011-2017                     *
+* Copyright (c) Network Time Foundation 2011-2020                     *
 *                                                                     *
 * All Rights Reserved                                                 *
 *                                                                     *
--- contrib/ntp/ChangeLog.orig
+++ contrib/ntp/ChangeLog
@@ -1,4 +1,100 @@
 ---
+(4.2.8p14) 2020/03/03 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 3610] process_control() should bail earlier on short packets. stenn@
+  - Reported by Philippe Antoine
+* [Sec 3596] Highly predictable timestamp attack. <stenn@ntp.org>
+  - Reported by Miroslav Lichvar
+* [Sec 3592] DoS attack on client ntpd <perlinger@ntp.org>
+  - Reported by Miroslav Lichvar
+* [Bug 3637] Emit the version of ntpd in saveconfig.  stenn@
+* [Bug 3636] NMEA: combine time/date from multiple sentences <perlinger@ntp.org>
+* [Bug 3635] Make leapsecond file hash check optional <perlinger@ntp.org>
+* [Bug 3634] Typo in discipline.html, reported by Jason Harrison.  stenn@
+* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
+  - implement Zeller's congruence in libparse and libntp <perlinger@ntp.org>
+* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap <perlinger@ntp.org>
+  - integrated patch by Cy Schubert
+* [Bug 3620] memory leak in ntpq sysinfo <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3619] Honour drefid setting in cooked mode and sysinfo <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3617] Add support for ACE III and Copernicus II receivers <perlinger@ntp.org>
+  - integrated patch by Richard Steedman
+* [Bug 3615] accelerate refclock startup <perlinger@ntp.org>
+* [Bug 3613] Propagate noselect to mobilized pool servers <stenn@ntp.org>
+  - Reported by Martin Burnicki
+* [Bug 3612] Use-of-uninitialized-value in receive function <perlinger@ntp.org>
+  - Reported by Philippe Antoine
+* [Bug 3611] NMEA time interpreted incorrectly <perlinger@ntp.org>
+  - officially document new "trust date" mode bit for NMEA driver
+  - restore the (previously undocumented) "trust date" feature lost with [bug 3577] 
+* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter <perlinger@ntp.org>
+  - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
+* [Bug 3608] libparse fails to compile on S11.4SRU13 and later <perlinger@ntp.org>
+  - removed ffs() and fls() prototypes as per Brian Utterback
+* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
+	ntp_io.c <perlinger@ntp.org>
+  - fixed byte and paramter order as suggested by wei6410@sina.com 
+* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no <perlinger@ntp.org>
+* [Bug 3599] Build fails on linux-m68k due to alignment issues <perlinger@ntp.org>
+  - added padding as suggested by John Paul Adrian Glaubitz 
+* [Bug 3594] ntpd discards messages coming through nmead <perlinger@ntp.org>
+* [Bug 3593] ntpd discards silently nmea messages after the 5th string <perlinger@ntp.org>
+* [Bug 3590] Update refclock_oncore.c to the new GPS date API <perlinger@ntp.org>
+* [Bug 3585] Unity tests mix buffered and unbuffered output <perlinger@ntp.org>
+  - stdout+stderr are set to line buffered during test setup now
+* [Bug 3583] synchronization error <perlinger@ntp.org>
+  - set clock to base date if system time is before that limit
+* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled <perlinger@ntp.org>
+* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) <perlinger@ntp.org>
+  - Reported by Paulo Neves
+* [Bug 3577] Update refclock_zyfer.c to the new GPS date API <perlinger@ntp.org>
+  - also updates for refclock_nmea.c and refclock_jupiter.c
+* [Bug 3576] New GPS date function API <perlinger@ntp.org>
+* [Bug 3573] nptdate: missleading error message <perlinger@ntp.org>
+* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo <perlinger@ntp.org>
+* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' <perlinger@ntp.org>
+  - sidekick: service port resolution in 'ntpdate'
+* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH <perlinger@ntp.org>
+  - applied patch by Douglas Royds
+* [Bug 3542] ntpdc monlist parameters cannot be set <perlinger@ntp.org>
+* [Bug 3533] ntpdc peer_info ipv6 issues <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3531] make check: test-decodenetnum fails <perlinger@ntp.org>
+  - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
+  - fix wrong cond-compile tests in unit tests
+* [Bug 3517] Reducing build noise <perlinger@ntp.org>
+* [Bug 3516] Require tooling from this decade <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() <perlinger@ntp.org>
+  - partial application of patch by Philipp Prindeville
+* [Bug 3491] Signed values of LFP datatypes should always display a sign
+  - applied patch by Gerry Garvey & fixed unit tests <perlinger@ntp.org>
+* [Bug 3490] Patch to support Trimble Resolution Receivers <perlinger@ntp.org>
+  - applied (modified) patch by Richard Steedman
+* [Bug 3473] RefID of refclocks should always be text format <perlinger@ntp.org>
+  - applied patch by Gerry Garvey (with minor formatting changes)
+* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails <perlinger@ntp.org>
+  - applied patch by Miroslav Lichvar
+* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+  <perlinger@ntp.org>
+* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
+             is specified with -u <perlinger@ntp.org>
+  - monitor daemon child startup & propagate exit codes
+* [Bug 1433] runtime check whether the kernel really supports capabilities
+  - (modified) patch by Kurt Roeckx <perlinger@ntp.org>
+* Clean up sntp/networking.c:sendpkt() error message.  <stenn@ntp.org>
+* Provide more detail on unrecognized config file parser tokens. <stenn@ntp.org>
+* Startup log improvements. <stenn@ntp.org>
+* Update the copyright year.
+* html/confopt.html: cleanup. <stenn@ntp.org>
+
+---
 (4.2.8p13) 2019/03/07 Released by Harlan Stenn <stenn@ntp.org>
 
 * [Sec 3565] Crafted null dereference attack in authenticated
--- contrib/ntp/CommitLog.orig
+++ contrib/ntp/CommitLog
@@ -1,10 +1,3065 @@
-ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org
+ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  NTP_4_2_8P14
+  TAG: NTP_4_2_8P14
+
+  ChangeLog@1.1974 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/invoke-ntp.conf.texi@1.221 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/invoke-ntp.keys.texi@1.206 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/invoke-ntpd.texi@1.520 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntp.conf.5man@1.255 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntp.conf.5mdoc@1.255 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntp.conf.html@1.203 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntp.conf.man.in@1.255 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntp.conf.mdoc.in@1.255 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntp.keys.5man@1.240 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntp.keys.5mdoc@1.240 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntp.keys.html@1.201 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntp.keys.man.in@1.240 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntp.keys.mdoc.in@1.240 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntpd-opts.c@1.543 +7 -7
+    NTP_4_2_8P14
+
+  ntpd/ntpd-opts.h@1.542 +3 -3
+    NTP_4_2_8P14
+
+  ntpd/ntpd.1ntpdman@1.349 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntpd.1ntpdmdoc@1.349 +1 -1
+    NTP_4_2_8P14
+
+  ntpd/ntpd.html@1.194 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntpd.man.in@1.349 +2 -2
+    NTP_4_2_8P14
+
+  ntpd/ntpd.mdoc.in@1.349 +1 -1
+    NTP_4_2_8P14
+
+  ntpdc/invoke-ntpdc.texi@1.517 +2 -2
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc-opts.c@1.536 +7 -7
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc-opts.h@1.535 +3 -3
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc.1ntpdcman@1.348 +2 -2
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc.html@1.363 +2 -2
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc.man.in@1.348 +2 -2
+    NTP_4_2_8P14
+
+  ntpdc/ntpdc.mdoc.in@1.348 +1 -1
+    NTP_4_2_8P14
+
+  ntpq/invoke-ntpq.texi@1.527 +2 -2
+    NTP_4_2_8P14
+
+  ntpq/ntpq-opts.c@1.545 +7 -7
+    NTP_4_2_8P14
+
+  ntpq/ntpq-opts.h@1.543 +3 -3
+    NTP_4_2_8P14
+
+  ntpq/ntpq.1ntpqman@1.355 +2 -2
+    NTP_4_2_8P14
+
+  ntpq/ntpq.1ntpqmdoc@1.355 +1 -1
+    NTP_4_2_8P14
+
+  ntpq/ntpq.html@1.194 +2 -2
+    NTP_4_2_8P14
+
+  ntpq/ntpq.man.in@1.355 +2 -2
+    NTP_4_2_8P14
+
+  ntpq/ntpq.mdoc.in@1.355 +1 -1
+    NTP_4_2_8P14
+
+  ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd.html@1.187 +1 -1
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2
+    NTP_4_2_8P14
+
+  ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1
+    NTP_4_2_8P14
+
+  packageinfo.sh@1.544 +1 -1
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1
+    NTP_4_2_8P14
+
+  scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1
+    NTP_4_2_8P14
+
+  scripts/invoke-plot_summary.texi@1.131 +2 -2
+    NTP_4_2_8P14
+
+  scripts/invoke-summary.texi@1.130 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait.html@1.359 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep.html@1.131 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1
+    NTP_4_2_8P14
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace-opts@1.79 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace.html@1.132 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace.man.in@1.116 +2 -2
+    NTP_4_2_8P14
+
+  scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1
+    NTP_4_2_8P14
+
+  scripts/plot_summary-opts@1.80 +2 -2
+    NTP_4_2_8P14
+
+  scripts/plot_summary.1plot_summaryman@1.129 +2 -2
+    NTP_4_2_8P14
+
+  scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1
+    NTP_4_2_8P14
+
+  scripts/plot_summary.html@1.134 +2 -2
+    NTP_4_2_8P14
+
+  scripts/plot_summary.man.in@1.129 +2 -2
+    NTP_4_2_8P14
+
+  scripts/plot_summary.mdoc.in@1.129 +1 -1
+    NTP_4_2_8P14
+
+  scripts/summary-opts@1.79 +2 -2
+    NTP_4_2_8P14
+
+  scripts/summary.1summaryman@1.128 +2 -2
+    NTP_4_2_8P14
+
+  scripts/summary.1summarymdoc@1.128 +1 -1
+    NTP_4_2_8P14
+
+  scripts/summary.html@1.133 +2 -2
+    NTP_4_2_8P14
+
+  scripts/summary.man.in@1.128 +2 -2
+    NTP_4_2_8P14
+
+  scripts/summary.mdoc.in@1.128 +1 -1
+    NTP_4_2_8P14
+
+  scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap-opts@1.30 +2 -2
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap.html@1.30 +1 -1
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap.man.in@1.29 +2 -2
+    NTP_4_2_8P14
+
+  scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1
+    NTP_4_2_8P14
+
+  sntp/invoke-sntp.texi@1.519 +2 -2
+    NTP_4_2_8P14
+
+  sntp/sntp-opts.c@1.539 +7 -7
+    NTP_4_2_8P14
+
+  sntp/sntp-opts.h@1.537 +3 -3
+    NTP_4_2_8P14
+
+  sntp/sntp.1sntpman@1.354 +2 -2
+    NTP_4_2_8P14
+
+  sntp/sntp.1sntpmdoc@1.354 +1 -1
+    NTP_4_2_8P14
+
+  sntp/sntp.html@1.535 +2 -2
+    NTP_4_2_8P14
+
+  sntp/sntp.man.in@1.354 +2 -2
+    NTP_4_2_8P14
+
+  sntp/sntp.mdoc.in@1.354 +1 -1
+    NTP_4_2_8P14
+
+  util/invoke-ntp-keygen.texi@1.522 +2 -2
+    NTP_4_2_8P14
+
+  util/ntp-keygen-opts.c@1.541 +7 -7
+    NTP_4_2_8P14
+
+  util/ntp-keygen-opts.h@1.539 +3 -3
+    NTP_4_2_8P14
+
+  util/ntp-keygen.1ntp-keygenman@1.350 +2 -2
+    NTP_4_2_8P14
+
+  util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1
+    NTP_4_2_8P14
+
+  util/ntp-keygen.html@1.195 +2 -2
+    NTP_4_2_8P14
+
+  util/ntp-keygen.man.in@1.350 +2 -2
+    NTP_4_2_8P14
+
+  util/ntp-keygen.mdoc.in@1.350 +1 -1
+    NTP_4_2_8P14
+
+ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  quiet some debug messages
+
+  ntpd/ntp_config.c@1.375 +0 -2
+    quiet some debug messages
+
+  ntpd/ntp_peer.c@1.166 +2 -0
+    quiet some debug messages
+
+ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  NTP_4_2_8P13
+  TAG: NTP_4_2_8P13
+
+  ChangeLog@1.1973 +1 -0
+    NTP_4_2_8P13
+
+  ntpd/invoke-ntp.conf.texi@1.220 +31 -7
+    NTP_4_2_8P13
+
+  ntpd/invoke-ntp.keys.texi@1.205 +1 -1
+    NTP_4_2_8P13
+
+  ntpd/invoke-ntpd.texi@1.519 +3 -3
+    NTP_4_2_8P13
+
+  ntpd/ntp.conf.5man@1.254 +34 -9
+    NTP_4_2_8P13
+
+  ntpd/ntp.conf.5mdoc@1.254 +41 -6
+    NTP_4_2_8P13
+
+  ntpd/ntp.conf.html@1.202 +33 -7
+    NTP_4_2_8P13
+
+  ntpd/ntp.conf.man.in@1.254 +34 -9
+    NTP_4_2_8P13
+
+  ntpd/ntp.conf.mdoc.in@1.254 +41 -6
+    NTP_4_2_8P13
+
+  ntpd/ntp.keys.5man@1.239 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntp.keys.5mdoc@1.239 +3 -3
+    NTP_4_2_8P13
+
+  ntpd/ntp.keys.man.in@1.239 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntp.keys.mdoc.in@1.239 +3 -3
+    NTP_4_2_8P13
+
+  ntpd/ntpd-opts.c@1.542 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntpd-opts.h@1.541 +3 -3
+    NTP_4_2_8P13
+
+  ntpd/ntpd.1ntpdman@1.348 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntpd.1ntpdmdoc@1.348 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntpd.man.in@1.348 +2 -2
+    NTP_4_2_8P13
+
+  ntpd/ntpd.mdoc.in@1.348 +2 -2
+    NTP_4_2_8P13
+
+  ntpdc/invoke-ntpdc.texi@1.516 +1 -1
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc-opts.c@1.535 +2 -2
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc-opts.h@1.534 +3 -3
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc.1ntpdcman@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc.html@1.362 +408 -353
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc.man.in@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc.mdoc.in@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpq/invoke-ntpq.texi@1.526 +1 -1
+    NTP_4_2_8P13
+
+  ntpq/ntpq-opts.c@1.544 +2 -2
+    NTP_4_2_8P13
+
+  ntpq/ntpq-opts.h@1.542 +3 -3
+    NTP_4_2_8P13
+
+  ntpq/ntpq.1ntpqman@1.354 +2 -2
+    NTP_4_2_8P13
+
+  ntpq/ntpq.1ntpqmdoc@1.354 +2 -2
+    NTP_4_2_8P13
+
+  ntpq/ntpq.html@1.193 +1 -1
+    NTP_4_2_8P13
+
+  ntpq/ntpq.man.in@1.354 +2 -2
+    NTP_4_2_8P13
+
+  ntpq/ntpq.mdoc.in@1.354 +2 -2
+    NTP_4_2_8P13
+
+  ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2
+    NTP_4_2_8P13
+
+  scripts/invoke-plot_summary.texi@1.130 +2 -2
+    NTP_4_2_8P13
+
+  scripts/invoke-summary.texi@1.129 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait.html@1.358 +181 -152
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep.html@1.130 +188 -152
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace-opts@1.78 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace.html@1.131 +179 -129
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace.man.in@1.115 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2
+    NTP_4_2_8P13
+
+  scripts/plot_summary-opts@1.79 +2 -2
+    NTP_4_2_8P13
+
+  scripts/plot_summary.1plot_summaryman@1.128 +2 -2
+    NTP_4_2_8P13
+
+  scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2
+    NTP_4_2_8P13
+
+  scripts/plot_summary.html@1.133 +203 -161
+    NTP_4_2_8P13
+
+  scripts/plot_summary.man.in@1.128 +2 -2
+    NTP_4_2_8P13
+
+  scripts/plot_summary.mdoc.in@1.128 +2 -2
+    NTP_4_2_8P13
+
+  scripts/summary-opts@1.78 +2 -2
+    NTP_4_2_8P13
+
+  scripts/summary.1summaryman@1.127 +2 -2
+    NTP_4_2_8P13
+
+  scripts/summary.1summarymdoc@1.127 +2 -2
+    NTP_4_2_8P13
+
+  scripts/summary.html@1.132 +184 -136
+    NTP_4_2_8P13
+
+  scripts/summary.man.in@1.127 +2 -2
+    NTP_4_2_8P13
+
+  scripts/summary.mdoc.in@1.127 +2 -2
+    NTP_4_2_8P13
+
+  scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap-opts@1.29 +2 -2
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap.html@1.29 +1 -1
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap.man.in@1.28 +2 -2
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2
+    NTP_4_2_8P13
+
+  sntp/invoke-sntp.texi@1.518 +1 -1
+    NTP_4_2_8P13
+
+  sntp/sntp-opts.c@1.538 +2 -2
+    NTP_4_2_8P13
+
+  sntp/sntp-opts.h@1.536 +3 -3
+    NTP_4_2_8P13
+
+  sntp/sntp.1sntpman@1.353 +2 -2
+    NTP_4_2_8P13
+
+  sntp/sntp.1sntpmdoc@1.353 +2 -2
+    NTP_4_2_8P13
+
+  sntp/sntp.html@1.534 +472 -418
+    NTP_4_2_8P13
+
+  sntp/sntp.man.in@1.353 +2 -2
+    NTP_4_2_8P13
+
+  sntp/sntp.mdoc.in@1.353 +2 -2
+    NTP_4_2_8P13
+
+  util/invoke-ntp-keygen.texi@1.521 +1 -1
+    NTP_4_2_8P13
+
+  util/ntp-keygen-opts.c@1.540 +2 -2
+    NTP_4_2_8P13
+
+  util/ntp-keygen-opts.h@1.538 +3 -3
+    NTP_4_2_8P13
+
+  util/ntp-keygen.1ntp-keygenman@1.349 +2 -2
+    NTP_4_2_8P13
+
+  util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2
+    NTP_4_2_8P13
+
+  util/ntp-keygen.html@1.194 +1 -1
+    NTP_4_2_8P13
+
+  util/ntp-keygen.man.in@1.349 +2 -2
+    NTP_4_2_8P13
+
+  util/ntp-keygen.mdoc.in@1.349 +2 -2
+    NTP_4_2_8P13
+
+ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  Replace line with head -1
+
+  scripts/build/addChangeLogTag@1.6 +1 -1
+    Replace line with head -1
+
+ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  provide get_pollskew() for simulator
+
+  ntpd/ntp_config.c@1.374 +2 -2
+    provide get_pollskew() for simulator
+
+ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  NTP_4_2_8P13
+  TAG: NTP_4_2_8P13 (currently on 1.3894)
+
+  BitKeeper/triggers/2mirrors@1.11 +6 -2
+    NTP_4_2_8P13
+
+  ntpd/ntpd-opts.c@1.539.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpd/ntpd-opts.h@1.538.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpd/ntpd.html@1.193 +3 -3
+    NTP_4_2_8P13
+
+  ntpd/ntpdsim-opts.c@1.29 +372 -340
+    NTP_4_2_8P13
+
+  ntpd/ntpdsim-opts.h@1.29 +44 -37
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpq/ntpq-opts.c@1.541.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpq/ntpq-opts.h@1.539.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpq/ntpq.html@1.192 +1 -1
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1
+    NTP_4_2_8P13
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/plot_summary-opts@1.76.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/summary-opts@1.75.1.1 +1 -1
+    NTP_4_2_8P13
+
+  scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1
+    NTP_4_2_8P13
+
+  sntp/sntp-opts.c@1.535.1.1 +1 -1
+    NTP_4_2_8P13
+
+  sntp/sntp-opts.h@1.533.1.1 +1 -1
+    NTP_4_2_8P13
+
+  util/ntp-keygen-opts.c@1.537.1.1 +1 -1
+    NTP_4_2_8P13
+
+  util/ntp-keygen-opts.h@1.535.1.1 +1 -1
+    NTP_4_2_8P13
+
+  util/ntp-keygen.html@1.193 +1 -1
+    NTP_4_2_8P13
+
+ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org
+  cleanup
+
+  NEWS@1.197.1.3 +3 -2
+    cleanup
+
+ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org
+  Cleanup distcheck psl* files
+
+  ntpd/Makefile.am@1.138 +11 -0
+    Cleanup distcheck psl* files
+
+ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org
+  Distribute ntp_calgps.h
+
+  include/Makefile.am@1.58 +1 -0
+    Distribute ntp_calgps.h
+
+ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org
+  Update the NEWS file for p14
+
+  NEWS@1.197.1.2 +107 -0
+    Update the NEWS file for p14
+
+ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org
+  merge cleanup
+
+  ntpd/ntp_proto.c@1.432 +1 -1
+    merge cleanup
+
+ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org
+  update
+
+  ntpd/ntp_keyword.h@1.38 +545 -539
+    update
+
+ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org
+  Startp logging improvements.
+  Bug3596.
+
+  html/accopt.html@1.48 +7 -2
+    cleanup.
+    bug3596: document 'serverresponse fuzz'
+
+  html/confopt.html@1.64.1.1 +22 -9
+    Cleanup.
+    
+    Bug 3596: document xmtnonce
+
+  html/miscopt.html@1.93 +19 -1
+    Cleanup.
+    
+    bug3596: document pollskewlist
+
+  include/Makefile.am@1.57 +1 -0
+    pollskew upodates
+
+  include/ntp.h@1.232 +8 -2
+    bug3596 chagnes:
+    - srvfuzrft patches
+    - pollskew updates
+    - xmtnonce
+
+  include/ntp_config.h@1.89 +27 -20
+    bug3596 updates:
+    - pollskewlist
+    - srvfuzrft patches
+
+  include/ntp_psl.h@1.1 +17 -0
+    BitKeeper file include/ntp_psl.h
+    ---
+    bug3596
+
+  include/ntp_psl.h@1.0 +0 -0
+
+  include/ntp_request.h@1.54 +2 -1
+    srvfuzrft patches
+
+  include/ntp_stdlib.h@1.88 +1 -1
+    randomizepoll/server response fuzz reftime fixes
+
+  include/ntpd.h@1.207 +1 -1
+    bug3596 cleanup
+
+  libntp/statestr.c@1.31 +12 -5
+    bug3596 srvrspfuz fixes
+
+  ntpd/Makefile.am@1.137 +37 -7
+    bug3596 pollskewlist changes
+
+  ntpd/complete.conf.in@1.37 +4 -2
+    bug3596: randompoll, pollskew xmtnonce
+
+  ntpd/keyword-gen-utd@1.35 +1 -1
+    Keyword table updates
+
+  ntpd/keyword-gen.c@1.42 +3 -3
+    bug3596: serverresponse fuzz, pollskewlist, xmtnonce
+
+  ntpd/ntp.conf.def@1.34 +40 -4
+    Cleanup.
+    bug3596: xmtnonce, serverresponse fuzz, pollskewlist,
+
+  ntpd/ntp_config.c@1.373 +250 -26
+    bug3596: serverresponse fuzz, pollskewlist, xmtnonce
+
+  ntpd/ntp_loopfilter.c@1.195 +1 -1
+    pollskew upodates
+
+  ntpd/ntp_parser.c@1.117 +1298 -1283
+    bug3596
+
+  ntpd/ntp_parser.h@1.79 +331 -334
+    bug3596
+
+  ntpd/ntp_parser.y@1.105 +49 -55
+    bug3596: serverresponse fuzz, pollskewlist, xmtnonce
+
+  ntpd/ntp_proto.c@1.427.1.2 +183 -36
+    bug3596: pollskewlist, server response fuzz, xmtnonce
+
+  ntpd/ntp_refclock.c@1.131 +1 -1
+    pollskew upodates
+
+  ntpd/ntp_request.c@1.131 +2 -2
+    randomizepoll/server response fuzz reftime fixes
+    ---
+    srvfuzrft patches
+    ---
+    bug3596 cleanup
+
+  ntpd/ntp_restrict.c@1.48 +5 -4
+    bug3596: pollskewlist, server response fuzz
+
+  ntpd/ntp_scanner.c@1.52 +16 -7
+    bug3596: serverresponse fuzz 
+
+  ntpd/ntpd.c@1.185 +8 -1
+    startup logging improvements
+
+  ntpd/psl0.conf@1.1 +1 -0
+    BitKeeper file ntpd/psl0.conf
+    ---
+    pollskewlist changes
+
+  ntpd/psl0.conf@1.0 +0 -0
+
+  ntpd/psl1.conf@1.1 +1 -0
+    BitKeeper file ntpd/psl1.conf
+    ---
+    pollskewlist changes
+
+  ntpd/psl1.conf@1.0 +0 -0
+
+  ntpd/psl2.conf@1.1 +1 -0
+    BitKeeper file ntpd/psl2.conf
+    ---
+    pollskewlist changes
+
+  ntpd/psl2.conf@1.0 +0 -0
+
+  ntpdc/layout.std@1.16 +8 -7
+    srvfuzrft patches
+
+  sntp/crypto.c@1.39 +2 -0
+    cleanup
+
+  tests/ntpd/t-ntp_scanner.c@1.9 +1 -1
+    Provide more detail on unrecognized config file parser tokens
+
+ChangeSet@1.3879, 2020-02-17 08:11:42+00:00, stenn@psp-deb1.ntp.org
+  updates
+
+  ChangeLog@1.1968.34.1 +2 -0
+
+ChangeSet@1.3877.1.2, 2020-02-08 23:00:11+00:00, stenn@psp-deb1.ntp.org
+  html/confopt.html cleanup
+
+  ChangeLog@1.1968.1.28 +1 -0
+    html/confopt.html cleanup
+
+  html/confopt.html@1.65 +83 -9
+    html/confopt.html cleanup
+
+ChangeSet@1.3877.1.1, 2020-02-04 23:58:57+00:00, stenn@psp-deb1.ntp.org
+  Update the copyright year
+
+  ChangeLog@1.1968.1.27 +1 -0
+    Update the copyright year
+
+  html/copyright.html@1.69 +2 -3
+    Update the copyright year
+
+  ntpd/invoke-ntp.conf.texi@1.219 +1 -1
+    Update the copyright year
+
+  ntpd/invoke-ntp.keys.texi@1.204 +1 -1
+    Update the copyright year
+
+  ntpd/invoke-ntpd.texi@1.518 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.conf.5man@1.253 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.conf.5mdoc@1.253 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.conf.man.in@1.253 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.conf.mdoc.in@1.253 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.keys.5man@1.238 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.keys.5mdoc@1.238 +4 -4
+    Update the copyright year
+
+  ntpd/ntp.keys.man.in@1.238 +3 -3
+    Update the copyright year
+
+  ntpd/ntp.keys.mdoc.in@1.238 +4 -4
+    Update the copyright year
+
+  ntpd/ntpd-opts.c@1.540 +5 -5
+    Update the copyright year
+
+  ntpd/ntpd-opts.h@1.539 +4 -4
+    Update the copyright year
+
+  ntpd/ntpd.1ntpdman@1.347 +3 -3
+    Update the copyright year
+
+  ntpd/ntpd.1ntpdmdoc@1.347 +3 -3
+    Update the copyright year
+
+  ntpd/ntpd.man.in@1.347 +3 -3
+    Update the copyright year
+
+  ntpd/ntpd.mdoc.in@1.347 +3 -3
+    Update the copyright year
+
+  ntpdc/invoke-ntpdc.texi@1.515 +1 -1
+    Update the copyright year
+
+  ntpdc/ntpdc-opts.c@1.533 +5 -5
+    Update the copyright year
+
+  ntpdc/ntpdc-opts.h@1.532 +4 -4
+    Update the copyright year
+
+  ntpdc/ntpdc.1ntpdcman@1.346 +3 -3
+    Update the copyright year
+
+  ntpdc/ntpdc.1ntpdcmdoc@1.346 +3 -3
+    Update the copyright year
+
+  ntpdc/ntpdc.html@1.361 +353 -408
+    Update the copyright year
+
+  ntpdc/ntpdc.man.in@1.346 +3 -3
+    Update the copyright year
+
+  ntpdc/ntpdc.mdoc.in@1.346 +3 -3
+    Update the copyright year
+
+  ntpq/invoke-ntpq.texi@1.525 +1 -1
+    Update the copyright year
+
+  ntpq/ntpq-opts.c@1.542 +5 -5
+    Update the copyright year
+
+  ntpq/ntpq-opts.h@1.540 +4 -4
+    Update the copyright year
+
+  ntpq/ntpq.1ntpqman@1.353 +3 -3
+    Update the copyright year
+
+  ntpq/ntpq.1ntpqmdoc@1.353 +3 -3
+    Update the copyright year
+
+  ntpq/ntpq.man.in@1.353 +3 -3
+    Update the copyright year
+
+  ntpq/ntpq.mdoc.in@1.353 +3 -3
+    Update the copyright year
+
+  ntpsnmpd/invoke-ntpsnmpd.texi@1.517 +1 -1
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.535 +5 -5
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.534 +4 -4
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.346 +3 -3
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.346 +3 -3
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd.man.in@1.346 +3 -3
+    Update the copyright year
+
+  ntpsnmpd/ntpsnmpd.mdoc.in@1.346 +3 -3
+    Update the copyright year
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.107 +2 -2
+    Update the copyright year
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.108 +2 -2
+    Update the copyright year
+
+  scripts/calc_tickadj/calc_tickadj.html@1.108 +127 -171
+    Update the copyright year
+
+  scripts/calc_tickadj/calc_tickadj.man.in@1.106 +2 -2
+    Update the copyright year
+
+  scripts/calc_tickadj/calc_tickadj.mdoc.in@1.108 +2 -2
+    Update the copyright year
+
+  scripts/calc_tickadj/invoke-calc_tickadj.texi@1.111 +1 -1
+    Update the copyright year
+
+  scripts/invoke-plot_summary.texi@1.129 +1 -1
+    Update the copyright year
+
+  scripts/invoke-summary.texi@1.128 +1 -1
+    Update the copyright year
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.338 +1 -1
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait-opts@1.74 +1 -1
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitman@1.335 +2 -2
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.336 +2 -2
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait.html@1.357 +151 -180
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait.man.in@1.335 +2 -2
+    Update the copyright year
+
+  scripts/ntp-wait/ntp-wait.mdoc.in@1.336 +2 -2
+    Update the copyright year
+
+  scripts/ntpsweep/invoke-ntpsweep.texi@1.126 +1 -1
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep-opts@1.76 +1 -1
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepman@1.114 +2 -2
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.114 +2 -2
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep.html@1.129 +151 -187
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep.man.in@1.114 +2 -2
+    Update the copyright year
+
+  scripts/ntpsweep/ntpsweep.mdoc.in@1.115 +2 -2
+    Update the copyright year
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.127 +1 -1
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace-opts@1.76 +1 -1
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace.1ntptraceman@1.114 +2 -2
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace.1ntptracemdoc@1.115 +2 -2
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace.html@1.130 +127 -177
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace.man.in@1.114 +2 -2
+    Update the copyright year
+
+  scripts/ntptrace/ntptrace.mdoc.in@1.116 +2 -2
+    Update the copyright year
+
+  scripts/plot_summary-opts@1.77 +1 -1
+    Update the copyright year
+
+  scripts/plot_summary.1plot_summaryman@1.127 +2 -2
+    Update the copyright year
+
+  scripts/plot_summary.1plot_summarymdoc@1.127 +2 -2
+    Update the copyright year
+
+  scripts/plot_summary.html@1.132 +159 -201
+    Update the copyright year
+
+  scripts/plot_summary.man.in@1.127 +2 -2
+    Update the copyright year
+
+  scripts/plot_summary.mdoc.in@1.127 +2 -2
+    Update the copyright year
+
+  scripts/summary-opts@1.76 +1 -1
+    Update the copyright year
+
+  scripts/summary.1summaryman@1.126 +2 -2
+    Update the copyright year
+
+  scripts/summary.1summarymdoc@1.126 +2 -2
+    Update the copyright year
+
+  scripts/summary.html@1.131 +134 -182
+    Update the copyright year
+
+  scripts/summary.man.in@1.126 +2 -2
+    Update the copyright year
+
+  scripts/summary.mdoc.in@1.126 +2 -2
+    Update the copyright year
+
+  scripts/update-leap/invoke-update-leap.texi@1.27 +1 -1
+    Update the copyright year
+
+  scripts/update-leap/update-leap-opts@1.27 +1 -1
+    Update the copyright year
+
+  scripts/update-leap/update-leap.1update-leapman@1.27 +2 -2
+    Update the copyright year
+
+  scripts/update-leap/update-leap.1update-leapmdoc@1.27 +2 -2
+    Update the copyright year
+
+  scripts/update-leap/update-leap.man.in@1.27 +2 -2
+    Update the copyright year
+
+  scripts/update-leap/update-leap.mdoc.in@1.27 +2 -2
+    Update the copyright year
+
+  sntp/include/copyright.def@1.28 +1 -1
+    Update the copyright year
+
+  sntp/invoke-sntp.texi@1.517 +1 -1
+    Update the copyright year
+
+  sntp/sntp-opts.c@1.536 +5 -5
+    Update the copyright year
+
+  sntp/sntp-opts.h@1.534 +4 -4
+    Update the copyright year
+
+  sntp/sntp.1sntpman@1.352 +3 -3
+    Update the copyright year
+
+  sntp/sntp.1sntpmdoc@1.352 +3 -3
+    Update the copyright year
+
+  sntp/sntp.html@1.533 +418 -472
+    Update the copyright year
+
+  sntp/sntp.man.in@1.352 +3 -3
+    Update the copyright year
+
+  sntp/sntp.mdoc.in@1.352 +3 -3
+    Update the copyright year
+
+  util/invoke-ntp-keygen.texi@1.520 +1 -1
+    Update the copyright year
+
+  util/ntp-keygen-opts.c@1.538 +5 -5
+    Update the copyright year
+
+  util/ntp-keygen-opts.h@1.536 +4 -4
+    Update the copyright year
+
+  util/ntp-keygen.1ntp-keygenman@1.348 +3 -3
+    Update the copyright year
+
+  util/ntp-keygen.1ntp-keygenmdoc@1.348 +3 -3
+    Update the copyright year
+
+  util/ntp-keygen.man.in@1.348 +3 -3
+    Update the copyright year
+
+  util/ntp-keygen.mdoc.in@1.348 +3 -3
+    Update the copyright year
+
+ChangeSet@1.3878, 2020-01-29 06:03:13+00:00, stenn@psp-deb1.ntp.org
+  Initial pass at fixes for bug 3596
+
+  include/ntp_config.h@1.88 +15 -2
+    Initial pass at fixes for bug 3596
+
+  ntpd/keyword-gen-utd@1.34 +1 -1
+    Initial pass at fixes for bug 3596
+
+  ntpd/keyword-gen.c@1.41 +5 -0
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_config.c@1.372 +13 -11
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_keyword.h@1.37 +940 -913
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_parser.c@1.116 +1362 -1285
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_parser.h@1.78 +356 -344
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_parser.y@1.104 +70 -2
+    Initial pass at fixes for bug 3596
+
+  ntpd/ntp_proto.c@1.427.1.1 +8 -0
+    Initial pass at fixes for bug 3596
+
+ChangeSet@1.3873.4.2, 2020-01-18 04:46:30-05:00, stenn@psp-deb2.ntp.org
+  [Bug 3637] Emit the version of ntpd in saveconfig
+
+  ntpd/Makefile.am@1.136 +2 -1
+    [Bug 3637] Emit the version of ntpd in saveconfig
+
+  ntpd/ntp_config.c@1.369.1.2 +3 -2
+    [Bug 3637] Emit the version of ntpd in saveconfig
+
+ChangeSet@1.3873.4.1, 2020-01-18 04:05:48-05:00, stenn@psp-deb2.ntp.org
+  [Bug 3637] Emit the version of ntpd in saveconfig
+
+  ChangeLog@1.1968.33.1 +1 -0
+    [Bug 3637] Emit the version of ntpd in saveconfig
+
+  ntpd/ntp_config.c@1.369.1.1 +7 -0
+    [Bug 3637] Emit the version of ntpd in saveconfig
+
+ChangeSet@1.3873.2.2, 2020-01-17 06:59:50+01:00, perlinger@ntp.org
+  [Bug 3636] NMEA: combine time/date from multiple sentences
+
+  ChangeLog@1.1968.30.2 +1 -0
+    [Bug 3636] NMEA: combine time/date from multiple sentences
+
+  html/drivers/driver20.html@1.34 +17 -9
+    [Bug 3636] NMEA: combine time/date from multiple sentences
+
+  include/ntp_calgps.h@1.4 +19 -4
+    [Bug 3636] NMEA: combine time/date from multiple sentences
+
+  libntp/ntp_calgps.c@1.4 +31 -20
+    [Bug 3636] NMEA: combine time/date from multiple sentences
+
+  ntpd/refclock_nmea.c@1.84 +158 -97
+    [Bug 3636] NMEA: combine time/date from multiple sentences
+
+ChangeSet@1.3873.3.2, 2020-01-12 07:10:55+01:00, perlinger@ntp.org
+  [Bug 3635] Make leapsecond file hash check optional
+
+  ChangeLog@1.1968.32.2 +1 -0
+    [Bug 3635] Make leapsecond file hash check optional
+
+  html/miscopt.html@1.92 +3 -2
+    [Bug 3635] Make leapsecond file hash check optional
+
+  include/ntp_config.h@1.87 +1 -0
+    [Bug 3635] Make leapsecond file hash check optional
+
+  include/ntpd.h@1.206 +1 -1
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/cmd_args.c@1.63 +3 -3
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/complete.conf.in@1.36 +2 -1
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/keyword-gen-utd@1.33 +1 -1
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/keyword-gen.c@1.40 +2 -0
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_config.c@1.370 +9 -4
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_keyword.h@1.36 +1043 -1029
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_leapsec.c@1.24 +36 -33
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_leapsec.h@1.15 +3 -2
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_parser.c@1.115 +1286 -1226
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_parser.h@1.77 +378 -371
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_parser.y@1.103 +20 -1
+    [Bug 3635] Make leapsecond file hash check optional
+
+  ntpd/ntp_util.c@1.120 +20 -16
+    [Bug 3635] Make leapsecond file hash check optional
+
+ChangeSet@1.3873.1.5, 2020-01-04 04:36:43-05:00, stenn@psp-deb2.ntp.org
+  cleanup
+
+  ChangeLog@1.1968.31.3 +2 -2
+    cleanup
+
+ChangeSet@1.3873.3.1, 2020-01-03 02:23:27-05:00, stenn@psp-deb2.ntp.org
+  [Bug 3634] Typo in discipline.html, reported by Jason Harrison.
+
+  ChangeLog@1.1968.32.1 +1 -0
+    [Bug 3634] Typo in discipline.html, reported by Jason Harrison.
+
+  html/discipline.html@1.11 +19 -18
+    [Bug 3634] Typo in discipline.html, reported by Jason Harrison.
+
+ChangeSet@1.3873.1.3, 2019-12-16 08:30:00+01:00, perlinger@ntp.org
+  [Sec 3592] DoS attack on client ntpd
+
+  ChangeLog@1.1968.31.1 +2 -0
+    [Sec 3592] DoS attack on client ntpd
+
+  ntpd/ntp_proto.c@1.430 +17 -1
+    [Sec 3592] DoS attack on client ntpd
+
+ChangeSet@1.3873.2.1, 2019-12-09 07:43:31+01:00, perlinger@ntp.org
+  [bug 3628] Zeller's congruence in calendar
+
+  ChangeLog@1.1968.30.1 +2 -0
+    [bug 3628] Zeller's congruence in calendar
+
+  include/ntp_calendar.h@1.23 +8 -0
+    [bug 3628] Zeller's congruence in calendar
+     - reconstruct century from y/m/d + day-of-week, 2digit year
+
+  include/ntp_calgps.h@1.3 +2 -2
+    [bug 3628] Zeller's congruence in calendar
+     - comment typos
+
+  libntp/ntp_calendar.c@1.26 +161 -43
+    [bug 3628] Zeller's congruence in calendar
+     - reconstruct century from y/m/d + day-of-week, 2digit year
+     - fast (mod 7) operations
+     - implement reverse Zeller congruence
+
+  libparse/clk_rawdcf.c@1.24 +55 -0
+    [bug 3628] Zeller's congruence in calendar
+     - in-situ implementation of Zeller's congruence
+
+  tests/libntp/calendar.c@1.18 +235 -0
+    [bug 3628] Zeller's congruence in calendar
+     - added unit tests for mod7 and century reconstruction
+     - test algorithm of in-situ implementation of Zeller's congruence in libparse
+
+  tests/libntp/run-calendar.c@1.19 +18 -0
+    [bug 3628] Zeller's congruence in calendar
+     - regenerated test driver
+
+ChangeSet@1.3873.1.2, 2019-12-07 08:19:05+01:00, perlinger@ntp.org
+  [bug 3592]
+   first try to move poll_update
+
+  ntpd/ntp_proto.c@1.429 +10 -9
+    [bug 3592]
+     first try to move poll_update
+
+ChangeSet@1.3873.1.1, 2019-12-05 05:58:36+00:00, stenn@psp-deb1.ntp.org
+  Note places to look for things related to bug 3592
+
+  ntpd/ntp_proto.c@1.428 +5 -0
+    Note places to look for things related to bug 3592
+
+ChangeSet@1.3874, 2019-11-18 06:04:58+00:00, perlinger@psp-deb1.ntp.org
+  [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap
+
+  ChangeLog@1.1968.1.23 +2 -0
+    [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap
+
+  ntpd/ntpd.c@1.184 +23 -0
+    [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap
+
+ChangeSet@1.3871.4.2, 2019-10-10 15:26:29+02:00, perlinger@ntp.org
+  [Bug 3620] memory leak in ntpq sysinfo
+
+  ChangeLog@1.1968.29.2 +2 -0
+    [Bug 3620] memory leak in ntpq sysinfo
+
+  ntpq/ntpq-subs.c@1.131 +4 -0
+    [Bug 3620] memory leak in ntpq sysinfo
+
+ChangeSet@1.3871.4.1, 2019-10-10 15:13:25+02:00, perlinger@ntp.org
+  [Bug 3619] Honour drefid setting in cooked mode and sysinfo
+
+  ChangeLog@1.1968.29.1 +2 -0
+    [Bug 3619] Honour drefid setting in cooked mode and sysinfo
+
+  ntpq/ntpq-subs.c@1.130 +18 -1
+    [Bug 3619] Honour drefid setting in cooked mode and sysinfo
+
+  ntpq/ntpq.c@1.192 +12 -5
+    [Bug 3619] Honour drefid setting in cooked mode and sysinfo
+
+  ntpq/ntpq.h@1.33 +1 -0
+    [Bug 3619] Honour drefid setting in cooked mode and sysinfo
+
+ChangeSet@1.3871.3.1, 2019-10-10 07:19:05+02:00, perlinger@ntp.org
+  [Bug 3612] Use-of-uninitialized-value in receive function
+
+  ChangeLog@1.1968.28.1 +2 -0
+    [Bug 3612] Use-of-uninitialized-value in receive function
+
+  ntpd/ntp_proto.c@1.427 +28 -15
+    [Bug 3612] Use-of-uninitialized-value in receive function
+
+ChangeSet@1.3871.2.1, 2019-10-04 07:29:17+02:00, perlinger@ntp.org
+  [Bug 3593] ntpd discards silently nmea messages after the 5th string
+
+  ChangeLog@1.1968.27.1 +1 -0
+    [Bug 3593] ntpd discards silently nmea messages after the 5th string
+
+  libntp/recvbuff.c@1.43 +0 -2
+    [Bug 3593] ntpd discards silently nmea messages after the 5th string
+     - replenish buffers *always* in 'get_full_recv_buffer', not just for signalled IO
+
+ChangeSet@1.3871.1.5, 2019-10-03 10:04:23+02:00, perlinger@ntp.org
+  [Bug 3594] ntpd discards messages coming through nmead
+
+  ChangeLog@1.1968.25.3 +1 -0
+    [Bug 3594] ntpd discards messages coming through nmead
+
+  ntpd/refclock_nmea.c@1.83 +110 -28
+    [Bug 3594] ntpd discards messages coming through nmead
+     - make socket I/O for NMEAD nonblocking
+     - do local line split / record assembly as TCP does not preserve boundaries
+
+ChangeSet@1.3871.1.3, 2019-09-26 06:46:14+00:00, stenn@psp-deb1.ntp.org
+  typo
+
+  html/clockopt.html@1.28 +2 -2
+    typo
+
+ChangeSet@1.3871.1.1, 2019-09-23 07:18:39+02:00, perlinger@ntp.org
+  [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no
+
+  ChangeLog@1.1968.26.1 +1 -0
+    [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no
+
+  sntp/m4/ntp_problemtests.m4@1.6 +12 -0
+    [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no
+     - disable the 'problematic' tests in all cases where ntp_cv_gc_sections_runs=no
+
+ChangeSet@1.3870.1.1, 2019-09-21 07:31:44+02:00, perlinger@ntp.org
+  [Bug 3615] accelerate refclock startup
+
+  ChangeLog@1.1968.25.1 +1 -0
+    [Bug 3615] accelerate refclock startup
+
+  include/ntp_refclock.h@1.39.1.1 +1 -0
+    [Bug 3615] accelerate refclock startup
+     - add 'inpoll' flag
+
+  ntpd/ntp_loopfilter.c@1.194 +30 -9
+    [Bug 3615] accelerate refclock startup
+     - time boxed stepping of sys_poll (avoid quick sys_poll overshoot)
+
+  ntpd/ntp_refclock.c@1.128.1.1 +77 -6
+    [Bug 3615] accelerate refclock startup
+     - check if clock status could benefit from early poll
+     - 'unsolicited' calls to refclock_receive add bits to the reach mask
+
+  ntpd/refclock_nmea.c@1.82 +14 -10
+    [Bug 3615] accelerate refclock startup
+     - minor sidekick: different order of data integrity checks reduces number of clock events
+       during signal dropout
+
+ChangeSet@1.3867.1.2, 2019-09-13 18:10:32+02:00, perlinger@ntp.org
+  [bug 3609] addendum: extended documention
+
+  html/clockopt.html@1.27 +4 -0
+    [bug 3609] addendum: extended documention
+
+ChangeSet@1.3872, 2019-09-13 08:18:14+02:00, perlinger@ntp.org
+  [Bug 3617] Add support for ACE III and Copernicus II receivers
+
+  ChangeLog@1.1968.1.21 +2 -0
+    [Bug 3617] Add support for ACE III and Copernicus II receivers
+
+  html/drivers/driver29.html@1.18 +68 -10
+    [Bug 3617] Add support for ACE III and Copernicus II receivers
+
+  ntpd/refclock_palisade.c@1.48 +197 -11
+    [Bug 3617] Add support for ACE III and Copernicus II receivers
+
+  ntpd/refclock_palisade.h@1.16 +5 -2
+    [Bug 3617] Add support for ACE III and Copernicus II receivers
+
+ChangeSet@1.3871, 2019-09-06 17:06:02+02:00, perlinger@ntp.org
+  [Bug 3613] 'pool' directive doesn't honor 'noselect' flag
+
+  ntpd/ntp_proto.c@1.426 +7 -5
+    [Bug 3613] 'pool' directive doesn't honor 'noselect' flag
+     - minor cleanup: define mask for all bits going from pool to peer
+
+ChangeSet@1.3870, 2019-09-06 01:32:24-07:00, harlan@max.pfcs.com
+  merge cleanup
+
+  ChangeLog@1.1968.1.20 +2 -1
+    merge cleanup
+
+ChangeSet@1.3844.23.1, 2019-09-05 23:41:13-07:00, harlan@max.pfcs.com
+  [Bug 3613] Propagate noselect to mobilized pool servers
+
+  ChangeLog@1.1968.24.1 +1 -0
+    [Bug 3613] Propagate noselect to mobilized pool servers
+
+  ntpd/ntp_proto.c@1.423.1.1 +4 -1
+    [Bug 3613] Propagate noselect to mobilized pool servers
+
+ChangeSet@1.3867.1.1, 2019-09-05 22:24:53+02:00, perlinger@ntp.org
+  [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+   - implementing 'fudge minjitter'
+
+  ChangeLog@1.1968.23.1 +2 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  html/clockopt.html@1.26 +12 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  include/ntp_refclock.h@1.40 +4 -1
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/complete.conf.in@1.35 +1 -1
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/keyword-gen.c@1.39 +1 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_config.c@1.369 +15 -4
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_control.c@1.237 +15 -2
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_keyword.h@1.35 +701 -694
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_parser.c@1.114 +805 -805
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_parser.h@1.76 +201 -199
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_parser.y@1.102 +2 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/ntp_refclock.c@1.129 +19 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+  ntpd/refclock_parse.c@1.88 +3 -0
+    [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
+     - implementing 'fudge minjitter'
+
+ChangeSet@1.3868, 2019-09-04 21:40:55+02:00, perlinger@ntp.org
+  [Bug 3611] NMEA time interpreted incorrectly
+
+  ChangeLog@1.1968.1.18 +3 -0
+    [Bug 3611] NMEA time interpreted incorrectly
+
+  html/drivers/driver20.html@1.33 +34 -2
+    [Bug 3611] NMEA time interpreted incorrectly
+     - add documentation for mode bit 18 ("date trust" feature)
+
+  include/ntp_calgps.h@1.2 +12 -2
+    [Bug 3611] NMEA time interpreted incorrectly
+     - make GPS era folding a runtime decision ("date trust" support)
+
+  libntp/ntp_calgps.c@1.3 +26 -13
+    [Bug 3611] NMEA time interpreted incorrectly
+     - make GPS era folding a runtime decision ("date trust" support)
+
+  ntpd/refclock_nmea.c@1.81 +5 -4
+    [Bug 3611] NMEA time interpreted incorrectly
+     - restore hitherto undocumented "date trust" feature (was lost in [bug 3577])
+     - move "date trust" to mode bit 18
+
+ChangeSet@1.3867, 2019-09-01 10:33:34+02:00, perlinger@ntp.org
+  [Bug 3576] New GPS date function API
+   - copy/paste bug in division code (32-bit non-ARM targets only)
+
+  libntp/ntp_calendar.c@1.25 +1 -1
+    [Bug 3576] New GPS date function API
+     - copy/paste bug in division code (32-bit non-ARM targets only)
+
+ChangeSet@1.3866, 2019-09-01 06:55:03+00:00, stenn@psp-deb1.ntp.org
+  Make 3610 a SEC bug
+
+  ChangeLog@1.1968.1.17 +1 -1
+    Make 3610 a SEC bug
+
+ChangeSet@1.3865, 2019-08-31 23:59:24+00:00, stenn@psp-deb1.ntp.org
+  Clean up sntp/networking.c:sendpkt() error message.
+
+  ChangeLog@1.1968.1.16 +1 -0
+    Clean up sntp/networking.c:sendpkt() error message.
+
+  sntp/networking.c@1.71 +1 -1
+    Clean up sntp/networking.c:sendpkt() error message.
+
+ChangeSet@1.3864, 2019-08-31 23:56:58+00:00, stenn@psp-deb1.ntp.org
+  [Bug 3610] process_control() should bail earlier on short packets. stenn@
+
+  ChangeLog@1.1968.1.15 +2 -0
+
+  ntpd/ntp_control.c@1.236 +13 -6
+
+ChangeSet@1.3863, 2019-08-20 08:36:42+02:00, perlinger@ntp.org
+  [Bug3608] libparse fails to compile on S11.4SRU13 and later
+
+  ChangeLog@1.1968.1.14 +2 -0
+    [Bug3608] libparse fails to compile on S11.4SRU13 and later
+
+  libparse/Makefile.am@1.33 +3 -1
+    [Bug3608] libparse fails to compile on S11.4SRU13 and later
+
+ChangeSet@1.3862, 2019-08-16 04:07:25-04:00, stenn@psp-deb2.ntp.org
+  ChangeLog:
+    merge cleanup
+
+  ChangeLog@1.1968.1.13 +3 -4
+    merge cleanup
+
+ChangeSet@1.3844.3.13, 2019-08-12 07:09:14+02:00, perlinger@ntp.org
+  [bug 3576] documentation typo
+
+  html/drivers/driver20.html@1.29.1.2 +1 -1
+    [bug 3576] documentation typo
+
+ChangeSet@1.3844.21.2, 2019-08-10 18:35:06+02:00, perlinger@ntp.org
+  comment change
+
+  include/ntp_request.h@1.53 +1 -1
+    comment change
+
+ChangeSet@1.3844.22.1, 2019-08-10 09:03:06+02:00, perlinger@ntp.org
+  [Bug 3604] Wrong param byte order passing into record_raw_stats() in ntp_io.c
+
+  ChangeLog@1.1968.21.1 +4 -0
+    [Bug 3604] Wrong param byte order passing into record_raw_stats() in ntp_io.c
+
+  ntpd/ntp_io.c@1.429.1.1 +8 -4
+    [Bug 3604] Wrong param byte order passing into record_raw_stats() in ntp_io.c
+
+ChangeSet@1.3844.21.1, 2019-08-10 08:31:59+02:00, perlinger@ntp.org
+  [Bug 3599] Build fails on linux-m68k due to alignment issues
+
+  ChangeLog@1.1968.20.1 +4 -0
+    [Bug 3599] Build fails on linux-m68k due to alignment issues
+
+  include/ntp_request.h@1.52 +1 -0
+    [Bug 3599] Build fails on linux-m68k due to alignment issues
+
+  ntpdc/layout.std@1.15 +1 -0
+    [Bug 3599] Build fails on linux-m68k due to alignment issues
+
+ChangeSet@1.3852, 2019-07-04 06:29:23-04:00, stenn@psp-deb2.ntp.org
+  typo
+
+  html/drivers/driver20.html@1.31 +1 -1
+    typo
+
+ChangeSet@1.3850, 2019-07-04 06:20:52-04:00, stenn@psp-deb2.ntp.org
+  Distribute include/timexsup.h
+
+  include/Makefile.am@1.56 +1 -0
+    Distribute include/timexsup.h
+
+ChangeSet@1.3844.3.12, 2019-06-20 06:23:08+02:00, perlinger@ntp.org
+  [Bug 3576] New GPS date function API
+   - sidekick: use different division tricks in calendar
+
+  libntp/ntp_calendar.c@1.24 +91 -95
+    [Bug 3576] New GPS date function API
+     - sidekick: use different division tricks in calendar, use linear fractionals for month length
+
+  tests/libntp/calendar.c@1.17 +28 -0
+    [Bug 3576] New GPS date function API
+     - sidekick: more calendar unit tests
+
+  tests/libntp/run-calendar.c@1.17 +22 -18
+    [Bug 3576] New GPS date function API
+     - sidekick: update unit test runner
+
+ChangeSet@1.3844.20.1, 2019-06-15 09:17:38+02:00, perlinger@ntp.org
+  [Bug 3473] RefID of refclocks should always be text format
+
+  ChangeLog@1.1968.19.1 +4 -0
+    [Bug 3473] RefID of refclocks should always be text format
+
+  ntpd/ntp_control.c@1.232.2.2 +4 -9
+    [Bug 3473] RefID of refclocks should always be text format
+
+  ntpdc/ntpdc_ops.c@1.86.1.1 +65 -63
+    [Bug 3473] RefID of refclocks should always be text format
+
+  ntpq/ntpq.c@1.189.1.1 +14 -1
+    [Bug 3473] RefID of refclocks should always be text format
+
+ChangeSet@1.3844.19.1, 2019-06-04 07:59:30+02:00, perlinger@ntp.org
+  [Bug 3490] Patch to support Trimble Resolution Receivers
+
+  ChangeLog@1.1968.18.1 +4 -0
+    [Bug 3490] Patch to support Trimble Resolution Receivers
+
+  ntpd/refclock_palisade.c@1.47 +45 -1
+    [Bug 3490] Patch to support Trimble Resolution Receivers
+     - original patch by Richard Steedman
+     - fixed bitwise AND vs boolean AND operation (not a real bug, but confusing)
+
+ChangeSet@1.3844.18.1, 2019-06-04 06:41:14+02:00, perlinger@ntp.org
+  [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  ChangeLog@1.1968.17.1 +4 -0
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  include/ntp_fp.h@1.35 +2 -2
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  libntp/dofptoa.c@1.10 +5 -5
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  libntp/dolfptoa.c@1.13 +5 -5
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  libntp/mstolfp.c@1.6 +3 -4
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  ntpq/ntpq-subs.c@1.127.1.1 +3 -3
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  ntpq/ntpq.c@1.190 +27 -10
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  tests/libntp/lfptostr.c@1.9 +18 -18
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+  tests/libntp/refidsmear.c@1.8 +16 -16
+    [Bug 3491] Signed values of LFP datatypes should always display a sign
+
+ChangeSet@1.3844.17.1, 2019-06-02 14:02:24+02:00, perlinger@ntp.org
+  [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+   - monitor daemon child startup & propagate exit codes
+
+  ChangeLog@1.1968.16.1 +5 -0
+    [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+     - monitor daemon child startup & propagate exit codes
+
+  configure.ac@1.616.1.1 +1 -0
+    [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+     - check for 'waitpid()'
+
+  include/ntpd.h@1.205 +1 -1
+    [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+     - unclutter daemon startup pipe handling
+
+  ntpd/ntp_proto.c@1.424 +4 -3
+    [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+     - unclutter daemon startup pipe handling
+     - send 'S' (--> synced) message to parent process
+
+  ntpd/ntpd.c@1.180.2.1 +150 -60
+    [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user is specified with -u
+     - monitor daemon child startup & propagate exit codes
+     - send 'R' (--> running) message to parent process when getting operational
+     - unclutter daemon startup pipe handling
+
+ChangeSet@1.3844.16.1, 2019-06-01 17:53:11+02:00, perlinger@ntp.org
+  [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+
+  ChangeLog@1.1968.15.1 +4 -0
+    [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+
+  include/ntp_io.h@1.24 +1 -1
+    [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+
+  ntpd/ntp_io.c@1.430 +38 -28
+    [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+     - disable the warning on an IPv6-only network. No harm done in that case, and the
+       semantic of 'sys_bclient' is too intricate for simple changes
+
+ChangeSet@1.3844.15.1, 2019-05-30 10:53:25+02:00, perlinger@ntp.org
+  [Bug 3533] ntpdc peer_info ipv6 issues
+
+  ChangeLog@1.1968.14.1 +4 -0
+    [Bug 3533] ntpdc peer_info ipv6 issues
+
+  ntpd/ntp_request.c@1.130 +1 -1
+    [Bug 3533] ntpdc peer_info ipv6 issues
+     - wrong address used in AF-specific branch decision
+
+  ntpdc/ntpdc.c@1.112.1.1 +8 -7
+    [Bug 3533] ntpdc peer_info ipv6 issues
+
+  ntpdc/ntpdc_ops.c@1.87 +10 -3
+    [Bug 3533] ntpdc peer_info ipv6 issues
+
+ChangeSet@1.3844.3.11, 2019-05-28 08:11:59+02:00, perlinger@ntp.org
+  [some cleanup of calendar calculations]
+
+  include/ntp_calendar.h@1.22 +43 -1
+    [some cleanup of calendar calculations]
+     - alternative implementation of the leapyear test
+
+  libntp/ntp_calendar.c@1.23 +19 -12
+    [some cleanup of calendar calculations]
+     - fix an embarrassing error in the 32bit-only code for day/week join
+
+  tests/libntp/calendar.c@1.16 +16 -0
+    [some cleanup of calendar calculations]
+     - add direkt unit test for leap year rule
+
+  tests/libntp/run-calendar.c@1.16 +16 -14
+    [some cleanup of calendar calculations]
+     - update regenerated file
+
+ChangeSet@1.3844.14.5, 2019-05-16 21:09:12+02:00, perlinger@ntp.org
+  [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code
+
+  ChangeLog@1.1968.13.5 +2 -0
+    [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code
+
+  ntpd/ntpd.c@1.180.1.2 +7 -12
+    [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code
+
+ChangeSet@1.3844.14.4, 2019-05-16 20:51:13+02:00, perlinger@ntp.org
+  [Bug 3510] Flatten out the #ifdef nesting in ntpdmain()
+
+  ChangeLog@1.1968.13.4 +2 -0
+    [Bug 3510] Flatten out the #ifdef nesting in ntpdmain()
+
+  ntpd/ntpd.c@1.180.1.1 +2 -6
+    [Bug 3510] Flatten out the #ifdef nesting in ntpdmain()
+
+ChangeSet@1.3844.14.3, 2019-05-16 20:19:10+02:00, perlinger@ntp.org
+  [Bug 3517] Reducing build noise
+
+  ChangeLog@1.1968.13.3 +1 -0
+    [Bug 3517] Reducing build noise
+
+  ntpq/Makefile.am@1.74 +15 -13
+    [Bug 3517] Reducing build noise
+     - linker flags useless for static library
+     - lines containing tabs only are bad in makefiles
+
+ChangeSet@1.3844.14.2, 2019-05-16 19:42:17+02:00, perlinger@ntp.org
+  [Bug 3516] Require tooling from this decade
+
+  ChangeLog@1.1968.13.2 +2 -0
+    [Bug 3516] Require tooling from this decade
+
+  configure.ac@1.617 +4 -7
+    [Bug 3516] Require tooling from this decade
+
+  sntp/configure.ac@1.86 +5 -7
+    [Bug 3516] Require tooling from this decade
+
+ChangeSet@1.3844.14.1, 2019-05-16 19:03:12+02:00, perlinger@ntp.org
+  [Bug 3511] Get rid of AC_LANG_SOURCE() warnings
+
+  ChangeLog@1.1968.13.1 +4 -0
+    [Bug 3511] Get rid of AC_LANG_SOURCE() warnings
+
+  sntp/libopts/m4/libopts.m4@1.35 +12 -12
+    [Bug 3511] Get rid of AC_LANG_SOURCE() warnings
+
+ChangeSet@1.3844.3.10, 2019-05-13 07:44:52+02:00, perlinger@ntp.org
+  [Bug 3590] Update refclock_oncore.c to the new GPS date API
+
+  ChangeLog@1.1968.3.3 +1 -0
+    [Bug 3590] Update refclock_oncore.c to the new GPS date API
+
+  libntp/ntp_calgps.c@1.2 +29 -5
+    [Bug 3590] Update refclock_oncore.c to the new GPS date API
+
+  ntpd/refclock_oncore.c@1.105 +54 -2
+    [Bug 3590] Update refclock_oncore.c to the new GPS date API
+     - use GPS era remapping
+
+  tests/libntp/calendar.c@1.15 +67 -28
+    [Bug 3590] Update refclock_oncore.c to the new GPS date API
+     - additional tests for era remapping
+
+  tests/libntp/run-calendar.c@1.15 +5 -3
+    [Bug 3590] Update refclock_oncore.c to the new GPS date API
+
+ChangeSet@1.3844.13.1, 2019-05-04 10:13:19+02:00, perlinger@ntp.org
+  [Bug 3531] make check: test-decodenetnum fails
+
+  ChangeLog@1.1968.12.1 +5 -0
+    [Bug 3531] make check: test-decodenetnum fails
+
+  include/ntp_control.h@1.60 +4 -0
+    [Bug 3531] make check: test-decodenetnum fails
+     - side kick: add preprocessor guards
+
+  libntp/decodenetnum.c@1.19 +57 -25
+    [Bug 3531] make check: test-decodenetnum fails
+     - harden against missing/incomplete /etc/services (getaddrinfo() croaks on service)
+
+  tests/libntp/decodenetnum.c@1.12 +6 -6
+    [Bug 3531] make check: test-decodenetnum fails
+     - fix cond-compile target/config guards
+
+  tests/libntp/sockaddrtest.c@1.3 +7 -1
+    [Bug 3531] make check: test-decodenetnum fails
+     - get strings to local buffers instead of overruning lib buffers
+
+  tests/libntp/socktoa.c@1.13 +8 -8
+    [Bug 3531] make check: test-decodenetnum fails
+     - fix cond-compile target/config guards
+
+ChangeSet@1.3844.8.2, 2019-05-02 10:26:12+02:00, perlinger@ntp.org
+  [Bug 3573] nptdate: missleading error message
+
+  ntpdate/ntpdate.c@1.102.1.2 +1 -3
+    [Bug 3573] nptdate: missleading error message
+     - sidekick: make failing to set IPV6_V6ONLY non-fatal
+
+ChangeSet@1.3844.12.1, 2019-05-02 08:35:23+02:00, perlinger@ntp.org
+  [Bug 1433] runtime check whether the kernel really supports capabilities
+
+  ChangeLog@1.1968.11.1 +4 -0
+    [Bug 1433] runtime check whether the kernel really supports capabilities
+
+  ntpd/ntpd.c@1.181 +27 -3
+    [Bug 1433] runtime check whether the kernel really supports capabilities
+
+ChangeSet@1.3844.11.1, 2019-05-02 07:27:17+02:00, perlinger@ntp.org
+  [Bug 3132] Building 4.2.8p8 with disabled local libopts fails
+
+  ChangeLog@1.1968.10.1 +4 -0
+    [Bug 3132] Building 4.2.8p8 with disabled local libopts fails
+
+  sntp/main.c@1.105 +4 -0
+    [Bug 3132] Building 4.2.8p8 with disabled local libopts fails
+     - include <sysexits.h> if we have it
+
+ChangeSet@1.3844.10.1, 2019-05-02 06:32:04+02:00, perlinger@ntp.org
+  [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH
+
+  ChangeLog@1.1968.9.1 +4 -0
+    [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH
+
+  scripts/build/mkver.in@1.16 +6 -1
+    [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH
+
+ChangeSet@1.3844.9.1, 2019-05-01 10:25:57+02:00, perlinger@ntp.org
+  [Bug 3542] ntpdc monlist parameters cannot be set
+
+  ChangeLog@1.1968.8.1 +3 -0
+    [Bug 3542] ntpdc monlist parameters cannot be set
+
+  ntpdc/ntpdc.c@1.113 +15 -35
+    [Bug 3542] ntpdc monlist parameters cannot be set
+     - fixed 'getarg()' number parsing (still assumed union and was badly refactored)
+
+ChangeSet@1.3844.8.1, 2019-05-01 07:24:20+02:00, perlinger@ntp.org
+  [Bug 3573] nptdate: missleading error message
+
+  ChangeLog@1.1968.7.1 +3 -0
+    [Bug 3573] nptdate: missleading error message
+
+  ntpdate/ntpdate.c@1.102.1.1 +5 -1
+    [Bug 3573] nptdate: missleading error message
+     - empty ARGV/ARGC acceptable only with NETINFO available
+
+ChangeSet@1.3844.6.2, 2019-04-30 08:09:13+02:00, perlinger@ntp.org
+  [Bug 3583] synchronization error
+   - update docs on 'tos basedate'
+
+  html/miscopt.html@1.91 +6 -2
+    [Bug 3583] synchronization error
+     - update docs on 'tos basedate'
+
+ChangeSet@1.3844.7.1, 2019-04-28 09:50:11+02:00, perlinger@ntp.org
+  [Bug 3585] Unity tests mix buffered and unbuffered output
+
+  ChangeLog@1.1968.6.1 +4 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+
+  include/ntp_syslog.h@1.10 +3 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - add 'change_iobufs()' for unit test setup
+
+  libntp/msyslog.c@1.55 +38 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - add 'change_iobufs()' for unit test setup
+
+  sntp/tests/run-crypto.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-keyFile.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-kodDatabase.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-kodFile.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-networking.c@1.5 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-packetHandling.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-packetProcessing.c@1.14 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-t-log.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/run-utilities.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  sntp/tests/testconf.yml@1.2 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/bug-2803/run-bug-2803.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/bug-2803/testconf.yml@1.2 +2 -1
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/bug-3102/testconf.yml@1.2 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/libntp/run-a_md5encrypt.c@1.17 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-atoint.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-atouint.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-authkeys.c@1.15 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-buftvtots.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-calendar.c@1.13.1.1 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-caljulian.c@1.15 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-caltontp.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-calyearstart.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-clocktime.c@1.12 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-decodenetnum.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-hextoint.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-hextolfp.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-humandate.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-lfpfunc.c@1.21 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-lfptostr.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-modetoa.c@1.14 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-msyslog.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-netof.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-numtoa.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-numtohost.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-octtoint.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-prettydate.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-recvbuff.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-refidsmear.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-refnumtoa.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-sbprintf.c@1.3 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-sfptostr.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-socktoa.c@1.16 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-ssl_init.c@1.11 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-statestr.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-strtolfp.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-timespecops.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-timevalops.c@1.16 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-tsafememcmp.c@1.3 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-tstotv.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-tvtots.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-uglydate.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-vi64ops.c@1.10 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/run-ymd2yd.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/libntp/testconf.yml@1.2 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/ntpd/run-leapsec.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/run-ntp_prio_q.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/run-ntp_restrict.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/run-rc_cmdlength.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/run-t-ntp_scanner.c@1.8 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/run-t-ntp_signd.c@1.13 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpd/testconf.yml@1.2 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/ntpq/run-t-ntpq.c@1.5 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/ntpq/testconf.yml@1.2 +2 -1
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/sandbox/run-modetoa.c@1.5 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/sandbox/run-uglydate.c@1.9 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/sandbox/run-ut-2803.c@1.4 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/sandbox/testconf.yml@1.2 +2 -1
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+  tests/sec-2853/run-sec-2853.c@1.7 +2 -0
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+      - regenrated test runner
+
+  tests/sec-2853/testconf.yml@1.2 +2 -1
+    [Bug 3585] Unity tests mix buffered and unbuffered output
+     - set output streams to line buffered during test suite setup
+
+ChangeSet@1.3844.6.1, 2019-04-27 18:55:23+02:00, perlinger@ntp.org
+  [Bug 3583] synchronization error
+
+  ChangeLog@1.1968.5.1 +4 -0
+    [Bug 3583] synchronization error
+
+  libntp/systime.c@1.75 +11 -15
+    [Bug 3583] synchronization error <perlinger@ntp.org>
+     - set clock to base date if system time is before that limit
+       (used to map inside the intended era, which is actually a bad idea)
+
+ChangeSet@1.3844.5.5, 2019-04-23 08:17:58+02:00, perlinger@ntp.org
+  [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled
+
+  ChangeLog@1.1968.4.1 +3 -0
+    [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled
+
+  ntpd/refclock_gpsdjson.c@1.30 +1 -1
+    [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled
+
+ChangeSet@1.3844.3.9, 2019-04-22 11:57:53+02:00, perlinger@ntp.org
+  [Bug 3577] silence some nitpicking from MSVC
+
+  ntpd/refclock_jupiter.c@1.34 +12 -12
+    [Bug 3577] silence some nitpicking from MSVC
+
+ChangeSet@1.3844.5.4, 2019-04-22 01:20:36-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+  Author cleanup
+
+  BitKeeper/etc/Authors/ntpreleng.txt@1.1 +1 -0
+    BitKeeper file BitKeeper/etc/Authors/ntpreleng.txt
+
+  BitKeeper/etc/Authors/ntpreleng.txt@1.0 +0 -0
+
+  BitKeeper/etc/authors.txt@1.3 +1 -2
+    Author cleanup
+
+ChangeSet@1.3844.5.3, 2019-04-21 03:33:53-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+  author cleanup
+
+  BitKeeper/deleted/2e/Brian.txt~204f4d9a946d68c3@1.2 +0 -0
+    Delete: BitKeeper/etc/Authors/Brian.txt
+
+ChangeSet@1.3844.5.2, 2019-04-21 03:26:18-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+  author cleanup
+
+  BitKeeper/etc/Authors/amidamaru.txt@1.3 +0 -0
+    Rename: BitKeeper/etc/Authors/Amidamaru.txt -> BitKeeper/etc/Authors/amidamaru.txt
+
+ChangeSet@1.3844.5.1, 2019-04-21 03:25:30-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+  author cleanup
+
+  BitKeeper/deleted/b5/amidamaru.txt~83565bba563cd9e2@1.3 +0 -0
+    Delete: BitKeeper/etc/Authors/amidamaru.txt
+
+  BitKeeper/etc/Authors/Amidamaru.txt@1.2 +1 -0
+    author cleanup
+
+  BitKeeper/triggers/Old/post-incoming.license-warn@1.11 +0 -0
+    Rename: BitKeeper/triggers/post-incoming.license-warn -> BitKeeper/triggers/Old/post-incoming.license-warn
+
+  BitKeeper/triggers/Old/pre-resolve.license-chk@1.12 +0 -0
+    Rename: BitKeeper/triggers/pre-resolve.license-chk -> BitKeeper/triggers/Old/pre-resolve.license-chk
+
+  BitKeeper/triggers/Old/pre-resolve.licfix@1.6 +0 -0
+    Rename: BitKeeper/triggers/pre-resolve.licfix -> BitKeeper/triggers/Old/pre-resolve.licfix
+
+ChangeSet@1.3844.3.7, 2019-04-20 08:38:11+02:00, perlinger@ntp.org
+  [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+
+  ChangeLog@1.1968.3.2 +2 -0
+    [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+
+  html/drivers/driver20.html@1.29.1.1 +22 -1
+    [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+
+  ntpd/refclock_jupiter.c@1.33 +312 -409
+    [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+
+  ntpd/refclock_nmea.c@1.80 +434 -703
+    [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+     - use new API to wrap/warp GPS time stamps
+     - implement silent PPS mode & data expiration
+     - major changes for string parsing, too
+
+  ntpd/refclock_zyfer.c@1.11 +21 -4
+    [Bug 3577] Update refclock_zyfer.c to the new GPS date API
+
+ChangeSet@1.3844.3.6, 2019-04-20 08:18:00+02:00, perlinger@ntp.org
+  [Bug 3576] New GPS date function API
+
+  ChangeLog@1.1968.3.1 +3 -0
+    [Bug 3576] New GPS date function API
+
+  include/ntp_calendar.h@1.21 +20 -1
+    [Bug 3576] New GPS date function API
+     - typedefs & new functions
+
+  include/ntp_calgps.h@1.1 +126 -0
+    [Bug 3576] New GPS date function API
+     - new module to do proper GPS epoch wrapping
+
+  include/ntp_calgps.h@1.0 +0 -0
+
+  include/ntp_refclock.h@1.39 +20 -9
+    [Bug 3576] New GPS date function API
+     - filter stage count is power of two now
+     - new functions for buffer handling
+
+  include/timespecops.h@1.6 +8 -179
+    [Bug 3576] New GPS date function API
+     - moved functions from inline to body
+
+  libntp/Makefile.am@1.82.1.1 +2 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  libntp/ntp_calendar.c@1.22 +398 -259
+    [Bug 3576] New GPS date function API
+     - typedefs & new functions
+
+  libntp/ntp_calgps.c@1.1 +586 -0
+    [Bug 3576] New GPS date function API
+     - new module to do proper GPS epoch wrapping
+
+  libntp/ntp_calgps.c@1.0 +0 -0
+
+  libntp/timespecops.c@1.1 +233 -0
+    [Bug 3576] New GPS date function API
+     - moved functions from inline to body
+
+  libntp/timespecops.c@1.0 +0 -0
+
+  ntpd/ntp_refclock.c@1.128 +309 -7
+    [Bug 3576] New GPS date function API
+     - filter stage count is power of two now
+     - new functions for buffer handling
+
+  ntpd/ntp_restrict.c@1.47 +0 -2
+    [Bug 3576] New GPS date function API
+     - side kick: remove unused variables
+
+  parseutil/dcfd.c@1.30 +10 -10
+    [Bug 3576] New GPS date function API
+     - side kick: fix compiler warnings (dprintf is a function and not the same as DPRINTF)
+
+  ports/winnt/vs2005/libntp.vcproj@1.28 +12 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  ports/winnt/vs2008/libntp/libntp.vcproj@1.59 +12 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  ports/winnt/vs2013/libntp/libntp.vcxproj@1.15 +3 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.13 +9 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  ports/winnt/vs2015/libntp/libntp.vcxproj@1.5 +3 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.5 +9 -0
+    [Bug 3576] New GPS date function API
+     - added new modules
+
+  tests/libntp/calendar.c@1.14 +169 -4
+    [Bug 3576] New GPS date function API
+     - week split function tests
+
+  tests/libntp/run-calendar.c@1.14 +27 -17
+    [Bug 3576] New GPS date function API
+     - regenerated
+
+ChangeSet@1.3844.4.1, 2019-04-08 21:54:16+02:00, perlinger@ntp.org
+  [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc)
+
+  ChangeLog@1.1968.1.4 +4 -0
+    [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc)
+
+  ntpq/ntpq-subs.c@1.128 +188 -147
+    [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc)
+     - wrap FILE I/O in functions that substitute stderr for NULL
+     - kill trailing whitespace
+
+ChangeSet@1.3844.3.5, 2019-03-10 17:10:50-07:00, ntpreleng@ntp-bk2git.tal1.ntfo.org
+  author updates
+
+  BitKeeper/etc/authors.txt@1.2 +4 -0
+    author updates
+
+ChangeSet@1.3844.3.4, 2019-03-10 17:04:30-07:00, ntpreleng@ntp-bk2git.tal1.ntfo.org
+  author updates
+
+  BitKeeper/etc/Authors/Amidamaru.txt@1.1 +1 -0
+    BitKeeper file BitKeeper/etc/Authors/Amidamaru.txt
+
+  BitKeeper/etc/Authors/Amidamaru.txt@1.0 +0 -0
+
+  BitKeeper/etc/Authors/Brian.txt@1.1 +1 -0
+    BitKeeper file BitKeeper/etc/Authors/Brian.txt
+
+  BitKeeper/etc/Authors/Brian.txt@1.0 +0 -0
+
+  BitKeeper/etc/Authors/brian.txt@1.1 +1 -0
+    BitKeeper file BitKeeper/etc/Authors/brian.txt
+
+  BitKeeper/etc/Authors/brian.txt@1.0 +0 -0
+
+  BitKeeper/etc/Authors/bwi.txt@1.1 +1 -0
+    BitKeeper file BitKeeper/etc/Authors/bwi.txt
+
+  BitKeeper/etc/Authors/bwi.txt@1.0 +0 -0
+
+ChangeSet@1.3844.3.3, 2019-03-10 17:03:40-07:00, ntpreleng@ntp-bk2git.tal1.ntfo.org
+  author updates
+
+  BitKeeper/etc/Authors/a115350.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/abe.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/amidamaru.txt@1.2 +1 -2
+
+  BitKeeper/etc/Authors/bkorb.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/blk.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/blu.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/bruckman.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/burnicki.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/claas.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/clemens.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/cov-build.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/cprice.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/davehart.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/dietrich.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/dunlop.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/fernandoph.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/fredb.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/gerstung.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/ginsbach.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/gnu.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/gopal.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/gunturu.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/harlan.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/harlanst.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/hart.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/hilbrecht.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/hstenn.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/jhay.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/jnperlin.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/kamboj.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/kardel.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/karlsson.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/kuehn.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/linus.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/loki.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/martin.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/matthias.andree.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/mayer.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/mbrett.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/murray.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/neal.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/paul.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/peda.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/perlinger.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/phk.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/rayvt.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/rick.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/ro.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/root.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/skamboj.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/stenn.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/tflendrich.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/tomek.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/utterback.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/venu.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/viperus.txt@1.2 +1 -1
+
+  BitKeeper/etc/Authors/wink.txt@1.2 +1 -1
+
+ChangeSet@1.3827.17.1, 2019-03-08 22:53:29-08:00, ntpreleng@ntp-build.tal1.ntfo.org
+  Use hostname builddirs at NTF
+
+  build@1.49.2.1 +1 -1
+    Use hostname builddirs at NTF
+
+ChangeSet@1.3844.3.1, 2019-03-07 11:59:40+00:00, stenn@psp-deb1.ntp.org
+  NTP_4_2_8P13
+  TAG: NTP_4_2_8P13 (currently on 1.3894)
+
+  ChangeLog@1.1968.1.3 +4 -1
+    ntp-4.2.8p13
+
+  NEWS@1.197.1.1 +54 -2
+    ntp-4.2.8p13
+
+  build@1.49.1.1 +1 -1
+    ntp-4.2.8p13
+
+  ntpd/invoke-ntp.conf.texi@1.218 +1 -1
+    ntp-4.2.8p13
+
+  ntpd/invoke-ntp.keys.texi@1.203 +1 -1
+    ntp-4.2.8p13
+
+  ntpd/invoke-ntpd.texi@1.517 +4 -4
+    ntp-4.2.8p13
+
+  ntpd/ntp.conf.5man@1.252 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntp.conf.5mdoc@1.252 +2 -2
+    ntp-4.2.8p13
+
+  ntpd/ntp.conf.html@1.201 +1680 -1266
+    ntp-4.2.8p13
+
+  ntpd/ntp.conf.man.in@1.252 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntp.conf.mdoc.in@1.252 +2 -2
+    ntp-4.2.8p13
+
+  ntpd/ntp.keys.5man@1.237 +2 -2
+    ntp-4.2.8p13
+
+  ntpd/ntp.keys.5mdoc@1.237 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntp.keys.html@1.200 +167 -116
+    ntp-4.2.8p13
+
+  ntpd/ntp.keys.man.in@1.237 +2 -2
+    ntp-4.2.8p13
+
+  ntpd/ntp.keys.mdoc.in@1.237 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntp_control.c@1.232.2.1 +17 -9
+    ntp-4.2.8p13
+
+  ntpd/ntpd-opts.c@1.539 +8 -8
+    ntp-4.2.8p13
+
+  ntpd/ntpd-opts.h@1.538 +5 -5
+    ntp-4.2.8p13
+
+  ntpd/ntpd.1ntpdman@1.346 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntpd.1ntpdmdoc@1.346 +2 -2
+    ntp-4.2.8p13
+
+  ntpd/ntpd.html@1.192 +758 -677
+    ntp-4.2.8p13
+
+  ntpd/ntpd.man.in@1.346 +3 -3
+    ntp-4.2.8p13
+
+  ntpd/ntpd.mdoc.in@1.346 +2 -2
+    ntp-4.2.8p13
+
+  ntpdc/invoke-ntpdc.texi@1.514 +2 -2
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc-opts.c@1.532 +8 -8
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc-opts.h@1.531 +5 -5
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc.1ntpdcman@1.345 +3 -3
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc.1ntpdcmdoc@1.345 +2 -2
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc.html@1.360 +425 -350
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc.man.in@1.345 +3 -3
+    ntp-4.2.8p13
+
+  ntpdc/ntpdc.mdoc.in@1.345 +2 -2
+    ntp-4.2.8p13
+
+  ntpq/invoke-ntpq.texi@1.524 +2 -2
+    ntp-4.2.8p13
+
+  ntpq/ntpq-opts.c@1.541 +8 -8
+    ntp-4.2.8p13
+
+  ntpq/ntpq-opts.h@1.539 +5 -5
+    ntp-4.2.8p13
+
+  ntpq/ntpq.1ntpqman@1.352 +3 -3
+    ntp-4.2.8p13
+
+  ntpq/ntpq.1ntpqmdoc@1.352 +2 -2
+    ntp-4.2.8p13
+
+  ntpq/ntpq.html@1.191 +1543 -1324
+    ntp-4.2.8p13
+
+  ntpq/ntpq.man.in@1.352 +3 -3
+    ntp-4.2.8p13
+
+  ntpq/ntpq.mdoc.in@1.352 +2 -2
+    ntp-4.2.8p13
+
+  ntpsnmpd/invoke-ntpsnmpd.texi@1.516 +10 -11
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.534 +8 -8
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.533 +5 -5
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.345 +3 -3
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.345 +2 -2
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd.html@1.186 +95 -58
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd.man.in@1.345 +3 -3
+    ntp-4.2.8p13
+
+  ntpsnmpd/ntpsnmpd.mdoc.in@1.345 +2 -2
+    ntp-4.2.8p13
+
+  packageinfo.sh@1.543 +1 -1
+    ntp-4.2.8p13
+
+  scripts/build/check--help@1.3.1.1 +2 -2
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.106 +3 -3
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.107 +2 -2
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/calc_tickadj.html@1.107 +178 -122
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/calc_tickadj.man.in@1.105 +3 -3
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/calc_tickadj.mdoc.in@1.107 +2 -2
+    ntp-4.2.8p13
+
+  scripts/calc_tickadj/invoke-calc_tickadj.texi@1.110 +1 -1
+    ntp-4.2.8p13
+
+  scripts/invoke-plot_summary.texi@1.128 +2 -2
+    ntp-4.2.8p13
+
+  scripts/invoke-summary.texi@1.127 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.337 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait-opts@1.73 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitman@1.334 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.335 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait.html@1.356 +189 -142
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait.man.in@1.334 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntp-wait/ntp-wait.mdoc.in@1.335 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/invoke-ntpsweep.texi@1.125 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep-opts@1.75 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepman@1.113 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.113 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep.html@1.128 +196 -149
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep.man.in@1.113 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntpsweep/ntpsweep.mdoc.in@1.114 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.126 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace-opts@1.75 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace.1ntptraceman@1.113 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace.1ntptracemdoc@1.114 +2 -2
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace.html@1.129 +186 -127
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace.man.in@1.113 +3 -3
+    ntp-4.2.8p13
+
+  scripts/ntptrace/ntptrace.mdoc.in@1.115 +2 -2
+    ntp-4.2.8p13
+
+  scripts/plot_summary-opts@1.76 +2 -2
+    ntp-4.2.8p13
+
+  scripts/plot_summary.1plot_summaryman@1.126 +3 -3
+    ntp-4.2.8p13
+
+  scripts/plot_summary.1plot_summarymdoc@1.126 +2 -2
+    ntp-4.2.8p13
+
+  scripts/plot_summary.html@1.131 +211 -151
+    ntp-4.2.8p13
+
+  scripts/plot_summary.man.in@1.126 +3 -3
+    ntp-4.2.8p13
+
+  scripts/plot_summary.mdoc.in@1.126 +2 -2
+    ntp-4.2.8p13
+
+  scripts/summary-opts@1.75 +2 -2
+    ntp-4.2.8p13
+
+  scripts/summary.1summaryman@1.125 +3 -3
+    ntp-4.2.8p13
+
+  scripts/summary.1summarymdoc@1.125 +2 -2
+    ntp-4.2.8p13
+
+  scripts/summary.html@1.130 +192 -132
+    ntp-4.2.8p13
+
+  scripts/summary.man.in@1.125 +3 -3
+    ntp-4.2.8p13
+
+  scripts/summary.mdoc.in@1.125 +2 -2
+    ntp-4.2.8p13
+
+  scripts/update-leap/invoke-update-leap.texi@1.26 +1 -1
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap-opts@1.26 +2 -2
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap.1update-leapman@1.26 +3 -3
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap.1update-leapmdoc@1.26 +2 -2
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap.html@1.28 +245 -197
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap.man.in@1.26 +3 -3
+    ntp-4.2.8p13
+
+  scripts/update-leap/update-leap.mdoc.in@1.26 +2 -2
+    ntp-4.2.8p13
+
+  sntp/invoke-sntp.texi@1.516 +2 -2
+    ntp-4.2.8p13
+
+  sntp/libopts/autoopts/options.h@1.30.1.1 +1 -1
+    ntp-4.2.8p13
+
+  sntp/libopts/genshell.h@1.30.1.1 +1 -1
+    ntp-4.2.8p13
+
+  sntp/sntp-opts.c@1.535 +8 -8
+    ntp-4.2.8p13
+
+  sntp/sntp-opts.h@1.533 +5 -5
+    ntp-4.2.8p13
+
+  sntp/sntp.1sntpman@1.351 +3 -3
+    ntp-4.2.8p13
+
+  sntp/sntp.1sntpmdoc@1.351 +2 -2
+    ntp-4.2.8p13
+
+  sntp/sntp.html@1.532 +493 -415
+    ntp-4.2.8p13
+
+  sntp/sntp.man.in@1.351 +3 -3
+    ntp-4.2.8p13
+
+  sntp/sntp.mdoc.in@1.351 +2 -2
+    ntp-4.2.8p13
+
+  util/invoke-ntp-keygen.texi@1.519 +2 -2
+    ntp-4.2.8p13
+
+  util/ntp-keygen-opts.c@1.537 +8 -8
+    ntp-4.2.8p13
+
+  util/ntp-keygen-opts.h@1.535 +5 -5
+    ntp-4.2.8p13
+
+  util/ntp-keygen.1ntp-keygenman@1.347 +3 -3
+    ntp-4.2.8p13
+
+  util/ntp-keygen.1ntp-keygenmdoc@1.347 +2 -2
+    ntp-4.2.8p13
+
+  util/ntp-keygen.html@1.192 +1184 -1025
+    ntp-4.2.8p13
+
+  util/ntp-keygen.man.in@1.347 +3 -3
+    ntp-4.2.8p13
+
+  util/ntp-keygen.mdoc.in@1.347 +2 -2
+    ntp-4.2.8p13
+
+ChangeSet@1.3844.1.5, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org
   Update NEWS file
 
   NEWS@1.200 +3 -0
     Update NEWS file
 
-ChangeSet@1.3848, 2019-02-20 09:44:58-08:00, harlan@ntp-build.tal1.ntfo.org
+ChangeSet@1.3844.1.4, 2019-02-20 09:44:58-08:00, harlan@ntp-build.tal1.ntfo.org
   build system cleanups
 
   build@1.50 +1 -1
@@ -19,7 +3074,7 @@
   sntp/libopts/genshell.h@1.31 +1 -1
     build system cleanups
 
-ChangeSet@1.3847, 2019-02-18 22:26:26-08:00, harlan@ntp-build.tal1.ntfo.org
+ChangeSet@1.3844.1.3, 2019-02-18 22:26:26-08:00, harlan@ntp-build.tal1.ntfo.org
   ChangeLog and NEWS description cleanups
 
   ChangeLog@1.1971 +4 -4
@@ -28,19 +3083,19 @@
   NEWS@1.199 +4 -2
     ChangeLog and NEWS description cleanups
 
-ChangeSet@1.3844.1.4, 2019-02-18 20:10:25-08:00, harlan@ntp-build.tal1.ntfo.org
+ChangeSet@1.3844.2.4, 2019-02-18 20:10:25-08:00, harlan@ntp-build.tal1.ntfo.org
   NEWS file update
 
   NEWS@1.198 +49 -2
     NEWS file update
 
-ChangeSet@1.3844.1.3, 2019-02-16 07:36:50+00:00, stenn@stenn.ntp.org
+ChangeSet@1.3844.2.3, 2019-02-16 07:36:50+00:00, stenn@stenn.ntp.org
   Improve messages around signalled IO handling in configure
 
   sntp/m4/ntp_libntp.m4@1.38 +5 -0
     Improve messages around signalled IO handling in configure
 
-ChangeSet@1.3844.1.2, 2019-02-15 13:27:05+00:00, stenn@stenn.ntp.org
+ChangeSet@1.3844.2.2, 2019-02-15 13:27:05+00:00, stenn@stenn.ntp.org
   Implement --disable-signalled-io
 
   ChangeLog@1.1968.1.2 +1 -0
@@ -49,21 +3104,74 @@
   sntp/m4/ntp_libntp.m4@1.37 +22 -2
     Implement --disable-signalled-io
 
-ChangeSet@1.3844.1.1, 2019-01-17 04:16:52+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3827.16.1, 2019-02-04 07:51:23+01:00, perlinger@ntp.org
+  [Bug 3570] NMEA driver docs: talker ID not mentioned, typo
+
+  ChangeLog@1.1952.16.1 +3 -0
+    [Bug 3570] NMEA driver docs: talker ID not mentioned, typo
+
+  html/drivers/driver20.html@1.30 +94 -48
+    [Bug 3570] NMEA driver docs: talker ID not mentioned, typo
+
+ChangeSet@1.3848, 2019-01-27 11:26:02+01:00, perlinger@ntp.org
+  [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()'
+    Changelog + assigned bug number
+
+  ChangeLog@1.1968.2.1 +2 -0
+    [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()'
+
+ChangeSet@1.3847, 2019-01-27 10:19:08+01:00, perlinger@ntp.org
+  ntpdate: fix service resolution if 'ntp' is not in '/etc/services'
+
+  ntpdate/ntpdate.c@1.103 +10 -1
+    ntpdate: fix service resolution if 'ntp' is not in '/etc/services'
+
+ChangeSet@1.3844.2.1, 2019-01-17 04:16:52+00:00, stenn@psp-deb1.ntp.org
   Cleanup
 
   ChangeLog@1.1968.1.1 +0 -1
     Cleanup
 
-ChangeSet@1.3845, 2019-01-16 21:42:59+01:00, perlinger@ntp.org
+ChangeSet@1.3844.1.1, 2019-01-16 21:42:59+01:00, perlinger@ntp.org
   [Sec 3565] null pointer crash by remote attack
 
   ChangeLog@1.1969 +3 -0
     [Sec 3565] null pointer crash by remote attack
 
-  ntpd/ntp_control.c@1.233 +17 -9
+  ntpd/ntp_control.c@1.232.1.1 +17 -9
     [Sec 3565] null pointer crash by remote attack
 
+ChangeSet@1.3846, 2019-01-06 10:58:40+01:00, perlinger@ntp.org
+  'struct timex' suppoert -- cleanup
+
+  libntp/timexsup.c@1.2 +1 -1
+    'struct timex' suppoert -- cleanup
+
+  ntpd/ntp_control.c@1.233 +9 -14
+    'struct timex' suppoert -- cleanup
+
+  util/ntptime.c@1.29 +39 -44
+    'struct timex' suppoert -- cleanup
+
+ChangeSet@1.3845, 2019-01-03 23:58:11+01:00, perlinger@ntp.org
+  refactor 'struct timex' access (MOD_NANO/STA_NANO)
+
+  include/timexsup.h@1.1 +42 -0
+    refactor 'struct timex' access (MOD_NANO/STA_NANO)
+
+  include/timexsup.h@1.0 +0 -0
+
+  libntp/Makefile.am@1.83 +1 -0
+    refactor 'struct timex' access (MOD_NANO/STA_NANO)
+
+  libntp/timexsup.c@1.1 +83 -0
+    refactor 'struct timex' access (MOD_NANO/STA_NANO)
+
+  libntp/timexsup.c@1.0 +0 -0
+
+  ntpd/ntp_loopfilter.c@1.193 +10 -25
+    refactor 'struct timex' access (MOD_NANO/STA_NANO)
+
 ChangeSet@1.3827.1.2, 2018-12-15 13:25:25+00:00, stenn@psp-deb1.ntp.org
   bug3527 fixes
 
@@ -154107,6 +157215,9 @@
   sntp/sntp-opts.texi@1.46.26.2 +1 -1
     NTP_4_2_4P8
 
+  sntp/sntp.1@1.49.26.2 +2 -2
+    NTP_4_2_4P8
+
   util/ntp-keygen-opts.c@1.49.26.2 +2 -2
     NTP_4_2_4P8
 
@@ -154186,6 +157297,9 @@
   sntp/sntp-opts.texi@1.46.26.1 +54 -2
     NTP_4_2_4P9_RC1
 
+  sntp/sntp.1@1.49.26.1 +2 -2
+    NTP_4_2_4P9_RC1
+
   util/ntp-keygen-opts.c@1.49.26.1 +5 -5
     NTP_4_2_4P9_RC1
 
@@ -171117,6 +174231,9 @@
   sntp/sntp-opts.texi@1.46.25.1 +1 -1
     NTP_4_2_4P7
 
+  sntp/sntp.1@1.49.25.1 +2 -2
+    NTP_4_2_4P7
+
   util/ntp-keygen-opts.c@1.49.25.1 +4 -4
     NTP_4_2_4P7
 
@@ -171482,6 +174599,9 @@
   sntp/sntp-opts.texi@1.46.24.1 +1 -1
     NTP_4_2_4P7_RC7
 
+  sntp/sntp.1@1.49.24.1 +3 -3
+    NTP_4_2_4P7_RC7
+
   util/ntp-keygen-opts.c@1.49.24.1 +3 -3
     NTP_4_2_4P7_RC7
 
@@ -171955,6 +175075,9 @@
   sntp/sntp-opts.texi@1.46.23.1 +1 -1
     NTP_4_2_4P7_RC6
 
+  sntp/sntp.1@1.49.23.1 +2 -2
+    NTP_4_2_4P7_RC6
+
   util/ntp-keygen-opts.c@1.49.23.1 +2 -2
     NTP_4_2_4P7_RC6
 
@@ -172668,6 +175791,9 @@
   sntp/sntp-opts.texi@1.46.22.1 +1 -1
     NTP_4_2_4P7_RC5
 
+  sntp/sntp.1@1.49.22.1 +2 -2
+    NTP_4_2_4P7_RC5
+
   util/ntp-keygen-opts.c@1.49.22.1 +2 -2
     NTP_4_2_4P7_RC5
 
@@ -173065,6 +176191,9 @@
   sntp/sntp-opts.texi@1.46.21.1 +1 -1
     NTP_4_2_4P7_RC4
 
+  sntp/sntp.1@1.49.21.1 +2 -2
+    NTP_4_2_4P7_RC4
+
   util/ntp-keygen-opts.c@1.49.21.1 +2 -2
     NTP_4_2_4P7_RC4
 
@@ -174075,6 +177204,9 @@
   sntp/sntp-opts.texi@1.46.20.1 +1 -1
     NTP_4_2_4P7_RC3
 
+  sntp/sntp.1@1.49.20.1 +2 -2
+    NTP_4_2_4P7_RC3
+
   util/ntp-keygen-opts.c@1.49.20.1 +2 -2
     NTP_4_2_4P7_RC3
 
@@ -174696,6 +177828,9 @@
   sntp/sntp-opts.texi@1.46.19.1 +1 -1
     NTP_4_2_4P7_RC2
 
+  sntp/sntp.1@1.49.19.1 +2 -2
+    NTP_4_2_4P7_RC2
+
   util/ntp-keygen-opts.c@1.49.19.1 +2 -2
     NTP_4_2_4P7_RC2
 
@@ -175235,6 +178370,9 @@
   sntp/sntp-opts.texi@1.46.18.1 +1 -1
     NTP_4_2_4P7_RC1
 
+  sntp/sntp.1@1.49.18.1 +2 -2
+    NTP_4_2_4P7_RC1
+
   util/ntp-keygen-opts.c@1.49.18.1 +2 -2
     NTP_4_2_4P7_RC1
 
@@ -176569,6 +179707,9 @@
   sntp/sntp-opts.texi@1.46.17.2 +1 -1
     NTP_4_2_4P6
 
+  sntp/sntp.1@1.49.17.2 +2 -2
+    NTP_4_2_4P6
+
   util/ntp-keygen-opts.c@1.49.17.2 +2 -2
     NTP_4_2_4P6
 
@@ -176648,6 +179789,9 @@
   sntp/sntp-opts.texi@1.46.17.1 +1 -1
     NTP_4_2_4P5
 
+  sntp/sntp.1@1.49.17.1 +2 -2
+    NTP_4_2_4P5
+
   util/ntp-keygen-opts.c@1.49.17.1 +1 -1
     NTP_4_2_4P5
 
@@ -179900,6 +183044,9 @@
 ChangeSet@1.1759, 2008-08-22 21:27:59-04:00, stenn@pogo.udel.edu
   remove bogus .o file
 
+  BitKeeper/deleted/.del-utilities.o@1.2 +0 -0
+    Delete: gsoc_sntp/utilities.o
+
 ChangeSet@1.1735.1.29, 2008-08-21 05:05:19+00:00, gopal@pogo.udel.edu
   driver20.html:
     [BUG 610] Documentation update for NMEA reference clock driver.
@@ -180178,6 +183325,9 @@
   sntp/sntp-opts.texi@1.46.16.1 +1 -1
     NTP_4_2_4P5
 
+  sntp/sntp.1@1.49.16.1 +2 -2
+    NTP_4_2_4P5
+
   util/ntp-keygen-opts.c@1.49.16.1 +2 -2
     NTP_4_2_4P5
 
@@ -180299,6 +183449,11 @@
 
   gsoc_sntp/utilities.h@1.0 +0 -0
 
+  gsoc_sntp/utilities.o@1.1 +177 -0
+    BitKeeper file /geom_mobile/home/Amidamaru/projects/sntp/repo/ntp-dev/gsoc_sntp/utilities.o
+
+  gsoc_sntp/utilities.o@1.0 +0 -0
+
 ChangeSet@1.1436.1.105, 2008-08-10 21:56:17-04:00, clemens@pogo.udel.edu
   BUG[1052] Minor reordering of previous patch to make it more robust.
 
@@ -180456,6 +183611,9 @@
   sntp/sntp-opts.texi@1.46.15.1 +2 -3
     NTP_4_2_4P5_RC2
 
+  sntp/sntp.1@1.49.15.1 +3 -3
+    NTP_4_2_4P5_RC2
+
   util/ntp-keygen-opts.c@1.49.15.1 +2 -2
     NTP_4_2_4P5_RC2
 
@@ -181916,6 +185074,9 @@
   sntp/sntp-opts.texi@1.46.14.1 +1 -1
     NTP_4_2_4P5_RC1
 
+  sntp/sntp.1@1.49.14.1 +2 -2
+    NTP_4_2_4P5_RC1
+
   util/ntp-keygen-opts.c@1.49.14.1 +6 -7
     NTP_4_2_4P5_RC1
 
@@ -187174,6 +190335,9 @@
   sntp/sntp-opts.texi@1.46.13.1 +1 -1
     NTP_4_2_4P4
 
+  sntp/sntp.1@1.49.13.1 +2 -2
+    NTP_4_2_4P4
+
   util/ntp-keygen-opts.c@1.49.13.1 +2 -2
     NTP_4_2_4P4
 
@@ -187480,6 +190644,9 @@
   sntp/sntp-opts.texi@1.46.12.1 +1 -1
     NTP_4_2_4P4_RC2
 
+  sntp/sntp.1@1.49.12.1 +2 -2
+    NTP_4_2_4P4_RC2
+
   util/ntp-keygen-opts.c@1.49.12.1 +4 -4
     NTP_4_2_4P4_RC2
 
@@ -187867,6 +191034,9 @@
   sntp/sntp-opts.texi@1.46.11.1 +1 -1
     NTP_4_2_4P4_RC1
 
+  sntp/sntp.1@1.49.11.1 +2 -2
+    NTP_4_2_4P4_RC1
+
   util/ntp-keygen-opts.c@1.49.11.1 +2 -2
     NTP_4_2_4P4_RC1
 
@@ -189214,6 +192384,9 @@
   sntp/sntp-opts.texi@1.46.10.1 +1 -1
     NTP_4_2_4P3
 
+  sntp/sntp.1@1.49.10.1 +2 -2
+    NTP_4_2_4P3
+
   util/ntp-keygen-opts.c@1.49.10.1 +2 -2
     NTP_4_2_4P3
 
@@ -189463,6 +192636,9 @@
   sntp/sntp-opts.texi@1.46.9.1 +1 -1
     NTP_4_2_4P3_RC1
 
+  sntp/sntp.1@1.49.9.1 +2 -2
+    NTP_4_2_4P3_RC1
+
   util/ntp-keygen-opts.c@1.49.9.1 +2 -2
     NTP_4_2_4P3_RC1
 
@@ -189958,6 +193134,9 @@
   sntp/sntp-opts.texi@1.46.8.1 +1 -1
     NTP_4_2_4P2
 
+  sntp/sntp.1@1.49.8.1 +2 -2
+    NTP_4_2_4P2
+
   util/ntp-keygen-opts.c@1.49.8.1 +2 -2
     NTP_4_2_4P2
 
@@ -190605,6 +193784,9 @@
   sntp/sntp-opts.texi@1.46.7.1 +1 -1
     NTP_4_2_4P2_RC6
 
+  sntp/sntp.1@1.49.7.1 +2 -2
+    NTP_4_2_4P2_RC6
+
   util/ntp-keygen-opts.c@1.49.7.1 +2 -2
     NTP_4_2_4P2_RC6
 
@@ -191359,6 +194541,9 @@
   sntp/sntp-opts.texi@1.46.6.1 +1 -1
     NTP_4_2_4P2_RC5
 
+  sntp/sntp.1@1.49.6.1 +2 -2
+    NTP_4_2_4P2_RC5
+
   util/ntp-keygen-opts.c@1.49.6.1 +2 -2
     NTP_4_2_4P2_RC5
 
@@ -191616,6 +194801,9 @@
   sntp/sntp-opts.texi@1.46.5.1 +1 -1
     NTP_4_2_4P2_RC4
 
+  sntp/sntp.1@1.49.5.1 +2 -2
+    NTP_4_2_4P2_RC4
+
   util/ntp-keygen-opts.c@1.49.5.1 +2 -2
     NTP_4_2_4P2_RC4
 
@@ -191826,6 +195014,9 @@
   sntp/sntp-opts.texi@1.46.4.1 +1 -1
     NTP_4_2_4P2_RC3
 
+  sntp/sntp.1@1.49.4.1 +2 -2
+    NTP_4_2_4P2_RC3
+
   util/ntp-keygen-opts.c@1.49.4.1 +2 -2
     NTP_4_2_4P2_RC3
 
@@ -192152,6 +195343,9 @@
   sntp/sntp-opts.texi@1.46.3.2 +1 -1
     NTP_4_2_4P2_RC2
 
+  sntp/sntp.1@1.49.3.2 +2 -2
+    NTP_4_2_4P2_RC2
+
   util/ntp-keygen-opts.c@1.49.3.2 +4 -4
     NTP_4_2_4P2_RC2
 
@@ -192895,6 +196089,9 @@
   sntp/sntp-opts.texi@1.46.3.1 +1 -1
     We need to use the upgraded autogen/libopts in -stable too.
 
+  sntp/sntp.1@1.49.3.1 +2 -2
+    We need to use the upgraded autogen/libopts in -stable too.
+
   util/ntp-keygen-opts.c@1.49.3.1 +23 -14
     We need to use the upgraded autogen/libopts in -stable too.
 
@@ -194949,6 +198146,9 @@
   sntp/sntp-opts.texi@1.46.2.2 +1 -1
     NTP_4_2_4P2_RC1
 
+  sntp/sntp.1@1.49.2.2 +2 -2
+    NTP_4_2_4P2_RC1
+
   util/ntp-keygen-opts.c@1.49.2.3 +2 -2
     NTP_4_2_4P2_RC1
 
@@ -195034,6 +198234,9 @@
   sntp/sntp-opts.texi@1.46.2.1 +1 -1
     NTP_4_2_4P1_RC1
 
+  sntp/sntp.1@1.49.2.1 +2 -2
+    NTP_4_2_4P1_RC1
+
   util/ntp-keygen-opts.c@1.49.2.2 +2 -2
     NTP_4_2_4P1_RC1
 
@@ -197194,6 +200397,9 @@
   sntp/sntp-opts.texi@1.46.1.6 +1 -1
     NTP_4_2_4P0
 
+  sntp/sntp.1@1.49.1.6 +2 -2
+    NTP_4_2_4P0
+
   util/ntp-keygen-opts.c@1.49.1.6 +2 -2
     NTP_4_2_4P0
 
@@ -197363,6 +200569,9 @@
   BitKeeper/deleted/.del-sntp-opts.texi@1.68 +0 -0
     Delete: sntp/sntp-opts.texi
 
+  BitKeeper/deleted/.del-sntp.1@1.71 +0 -0
+    Delete: sntp/sntp.1
+
   ntpd/ntpd-opts.c@1.1 +1055 -0
     BitKeeper file /deacon/backroom/ntp-dev/ntpd/ntpd-opts.c
 
@@ -197556,6 +200765,9 @@
   sntp/sntp-opts.texi@1.66 +1 -1
     NTP_4_2_5P15
 
+  sntp/sntp.1@1.69 +2 -2
+    NTP_4_2_5P15
+
   util/ntp-keygen-opts.c@1.69 +2 -2
     NTP_4_2_5P15
 
@@ -197645,6 +200857,9 @@
   sntp/sntp-opts.texi@1.65 +1 -1
     NTP_4_2_5P14
 
+  sntp/sntp.1@1.68 +2 -2
+    NTP_4_2_5P14
+
   util/ntp-keygen-opts.c@1.68 +2 -2
     NTP_4_2_5P14
 
@@ -197738,6 +200953,9 @@
   sntp/sntp-opts.texi@1.64 +1 -1
     NTP_4_2_5P13
 
+  sntp/sntp.1@1.67 +2 -2
+    NTP_4_2_5P13
+
   util/ntp-keygen-opts.c@1.67 +2 -2
     NTP_4_2_5P13
 
@@ -197830,6 +201048,9 @@
   sntp/sntp-opts.texi@1.63 +1 -1
     NTP_4_2_5P12
 
+  sntp/sntp.1@1.66 +2 -2
+    NTP_4_2_5P12
+
   util/ntp-keygen-opts.c@1.66 +2 -2
     NTP_4_2_5P12
 
@@ -197906,6 +201127,9 @@
   sntp/sntp-opts.texi@1.46.1.5 +1 -1
     NTP_4_2_4P0_RC5
 
+  sntp/sntp.1@1.49.1.5 +2 -2
+    NTP_4_2_4P0_RC5
+
   util/ntp-keygen-opts.c@1.49.1.5 +2 -2
     NTP_4_2_4P0_RC5
 
@@ -197994,6 +201218,9 @@
   sntp/sntp-opts.texi@1.62 +1 -1
     NTP_4_2_5P11
 
+  sntp/sntp.1@1.65 +2 -2
+    NTP_4_2_5P11
+
   util/ntp-keygen-opts.c@1.65 +2 -2
     NTP_4_2_5P11
 
@@ -198085,6 +201312,9 @@
   sntp/sntp-opts.texi@1.61 +1 -1
     NTP_4_2_5P10
 
+  sntp/sntp.1@1.64 +2 -2
+    NTP_4_2_5P10
+
   util/ntp-keygen-opts.c@1.64 +2 -2
     NTP_4_2_5P10
 
@@ -198167,6 +201397,9 @@
   sntp/sntp-opts.texi@1.59 +1 -1
     NTP_4_2_5P9
 
+  sntp/sntp.1@1.62 +2 -2
+    NTP_4_2_5P9
+
   util/ntp-keygen-opts.c@1.62 +2 -2
     NTP_4_2_5P9
 
@@ -198243,6 +201476,9 @@
   sntp/sntp-opts.texi@1.46.1.4 +1 -1
     NTP_4_2_4P0_RC4
 
+  sntp/sntp.1@1.49.1.4 +2 -2
+    NTP_4_2_4P0_RC4
+
   util/ntp-keygen-opts.c@1.49.1.4 +2 -2
     NTP_4_2_4P0_RC4
 
@@ -198352,6 +201588,9 @@
   sntp/sntp-opts.texi@1.57 +1 -1
     NTP_4_2_5P8
 
+  sntp/sntp.1@1.60 +2 -2
+    NTP_4_2_5P8
+
   util/ntp-keygen-opts.c@1.60 +2 -2
     NTP_4_2_5P8
 
@@ -198437,6 +201676,9 @@
   sntp/sntp-opts.texi@1.56 +1 -1
     NTP_4_2_5P7
 
+  sntp/sntp.1@1.59 +2 -2
+    NTP_4_2_5P7
+
   util/ntp-keygen-opts.c@1.59 +2 -2
     NTP_4_2_5P7
 
@@ -198537,6 +201779,9 @@
   sntp/sntp-opts.texi@1.55 +1 -1
     NTP_4_2_5P6
 
+  sntp/sntp.1@1.58 +2 -2
+    NTP_4_2_5P6
+
   util/ntp-keygen-opts.c@1.58 +2 -2
     NTP_4_2_5P6
 
@@ -198613,6 +201858,9 @@
   sntp/sntp-opts.texi@1.46.1.3 +1 -1
     NTP_4_2_4_RC3
 
+  sntp/sntp.1@1.49.1.3 +2 -2
+    NTP_4_2_4_RC3
+
   util/ntp-keygen-opts.c@1.49.1.3 +2 -2
     NTP_4_2_4_RC3
 
@@ -198758,6 +202006,9 @@
   sntp/sntp-opts.texi@1.53 +1 -1
     NTP_4_2_5P5
 
+  sntp/sntp.1@1.56 +2 -2
+    NTP_4_2_5P5
+
   util/ntp-keygen-opts.c@1.56 +2 -2
     NTP_4_2_5P5
 
@@ -198840,6 +202091,9 @@
   sntp/sntp-opts.texi@1.52 +1 -1
     NTP_4_2_5P4
 
+  sntp/sntp.1@1.55 +2 -2
+    NTP_4_2_5P4
+
   util/ntp-keygen-opts.c@1.55 +2 -2
     NTP_4_2_5P4
 
@@ -198916,6 +202170,9 @@
   sntp/sntp-opts.texi@1.46.1.2 +1 -1
     NTP_4_2_4_RC2
 
+  sntp/sntp.1@1.49.1.2 +2 -2
+    NTP_4_2_4_RC2
+
   util/ntp-keygen-opts.c@1.49.1.2 +2 -2
     NTP_4_2_4_RC2
 
@@ -199061,6 +202318,9 @@
   sntp/sntp-opts.texi@1.51 +1 -1
     NTP_4_2_5P3
 
+  sntp/sntp.1@1.54 +2 -2
+    NTP_4_2_5P3
+
   util/ntp-keygen-opts.c@1.54 +2 -2
     NTP_4_2_5P3
 
@@ -199143,6 +202403,9 @@
   sntp/sntp-opts.texi@1.46.1.1 +1 -1
     NTP_4_2_4_RC1
 
+  sntp/sntp.1@1.49.1.1 +2 -2
+    NTP_4_2_4_RC1
+
   util/ntp-keygen-opts.c@1.49.1.1 +2 -2
     NTP_4_2_4_RC1
 
@@ -199372,6 +202635,9 @@
   sntp/sntp-opts.texi@1.49 +1 -1
     NTP_4_2_5P2
 
+  sntp/sntp.1@1.52 +2 -2
+    NTP_4_2_5P2
+
   util/ntp-keygen-opts.c@1.52 +2 -2
     NTP_4_2_5P2
 
@@ -199489,6 +202755,9 @@
   sntp/sntp-opts.texi@1.48 +1 -1
     NTP_4_2_5P1
 
+  sntp/sntp.1@1.51 +2 -2
+    NTP_4_2_5P1
+
   util/ntp-keygen-opts.c@1.51 +2 -2
     NTP_4_2_5P1
 
@@ -200120,6 +203389,9 @@
   sntp/sntp-opts.texi@1.45.1.2 +1 -1
     NTP_4_2_5P0
 
+  sntp/sntp.1@1.48.1.2 +2 -2
+    NTP_4_2_5P0
+
   util/ntp-keygen-opts.c@1.48.1.2 +2 -2
     NTP_4_2_5P0
 
@@ -200229,6 +203501,9 @@
   sntp/sntp-opts.texi@1.45.1.1 +1 -1
     NTP_4_2_5
 
+  sntp/sntp.1@1.48.1.1 +2 -2
+    NTP_4_2_5
+
   util/ntp-keygen-opts.c@1.48.1.1 +2 -2
     NTP_4_2_5
 
@@ -200305,6 +203580,9 @@
   sntp/sntp-opts.texi@1.46 +1 -1
     NTP_4_2_4
 
+  sntp/sntp.1@1.49 +2 -2
+    NTP_4_2_4
+
   util/ntp-keygen-opts.c@1.49 +2 -2
     NTP_4_2_4
 
@@ -200483,6 +203761,9 @@
   sntp/sntp-opts.texi@1.45 +1 -1
     NTP_4_2_3P70_RC
 
+  sntp/sntp.1@1.48 +2 -2
+    NTP_4_2_3P70_RC
+
   util/ntp-keygen-opts.c@1.48 +2 -2
     NTP_4_2_3P70_RC
 
@@ -200568,6 +203849,9 @@
   sntp/sntp-opts.texi@1.44 +9 -1
     NTP_4_2_3P69_RC
 
+  sntp/sntp.1@1.47 +8 -64
+    NTP_4_2_3P69_RC
+
   util/ntp-keygen-opts.c@1.47 +2 -2
     NTP_4_2_3P69_RC
 
@@ -200659,6 +203943,9 @@
   sntp/sntp-opts.texi@1.43 +1 -1
     NTP_4_2_3P68_RC
 
+  sntp/sntp.1@1.46 +2 -2
+    NTP_4_2_3P68_RC
+
   util/ntp-keygen-opts.c@1.46 +2 -2
     NTP_4_2_3P68_RC
 
@@ -200753,6 +204040,9 @@
   sntp/sntp-opts.texi@1.42 +1 -1
     NTP_4_2_3P67_RC
 
+  sntp/sntp.1@1.45 +2 -2
+    NTP_4_2_3P67_RC
+
   util/ntp-keygen-opts.c@1.45 +2 -2
     NTP_4_2_3P67_RC
 
@@ -200850,6 +204140,9 @@
   sntp/sntp-opts.texi@1.41 +1 -1
     NTP_4_2_3P66_RC
 
+  sntp/sntp.1@1.44 +2 -2
+    NTP_4_2_3P66_RC
+
   util/ntp-keygen-opts.c@1.44 +2 -2
     NTP_4_2_3P66_RC
 
@@ -200944,6 +204237,9 @@
   sntp/sntp-opts.texi@1.40 +1 -1
     NTP_4_2_3P65_RC
 
+  sntp/sntp.1@1.43 +2 -2
+    NTP_4_2_3P65_RC
+
   util/ntp-keygen-opts.c@1.43 +2 -2
     NTP_4_2_3P65_RC
 
@@ -201032,6 +204328,9 @@
   sntp/sntp-opts.texi@1.39 +1 -1
     NTP_4_2_3P64_RC
 
+  sntp/sntp.1@1.42 +2 -2
+    NTP_4_2_3P64_RC
+
   util/ntp-keygen-opts.c@1.42 +2 -2
     NTP_4_2_3P64_RC
 
@@ -201124,6 +204423,9 @@
   sntp/sntp-opts.texi@1.38 +1 -1
     NTP_4_2_3P63_RC
 
+  sntp/sntp.1@1.41 +2 -2
+    NTP_4_2_3P63_RC
+
   util/ntp-keygen-opts.c@1.41 +2 -2
     NTP_4_2_3P63_RC
 
@@ -201233,6 +204535,9 @@
   sntp/sntp-opts.texi@1.37 +1 -1
     NTP_4_2_3P62_RC
 
+  sntp/sntp.1@1.40 +2 -2
+    NTP_4_2_3P62_RC
+
   util/ntp-keygen-opts.c@1.40 +2 -2
     NTP_4_2_3P62_RC
 
@@ -201324,6 +204629,9 @@
   sntp/sntp-opts.texi@1.36 +1 -1
     NTP_4_2_3P61_RC
 
+  sntp/sntp.1@1.39 +2 -2
+    NTP_4_2_3P61_RC
+
   util/ntp-keygen-opts.c@1.39 +2 -2
     NTP_4_2_3P61_RC
 
@@ -201409,6 +204717,9 @@
   sntp/sntp-opts.texi@1.35 +1 -1
     NTP_4_2_3P60_RC
 
+  sntp/sntp.1@1.38 +2 -2
+    NTP_4_2_3P60_RC
+
   util/ntp-keygen-opts.c@1.38 +2 -2
     NTP_4_2_3P60_RC
 
@@ -201504,6 +204815,9 @@
   sntp/sntp-opts.texi@1.34 +1 -1
     NTP_4_2_3P59
 
+  sntp/sntp.1@1.37 +2 -2
+    NTP_4_2_3P59
+
   util/ntp-keygen-opts.c@1.37 +2 -2
     NTP_4_2_3P59
 
@@ -201606,6 +204920,9 @@
   sntp/sntp-opts.texi@1.33 +1 -1
     NTP_4_2_3P58
 
+  sntp/sntp.1@1.36 +2 -2
+    NTP_4_2_3P58
+
   util/ntp-keygen-opts.c@1.36 +2 -2
     NTP_4_2_3P58
 
@@ -201705,6 +205022,9 @@
   sntp/sntp-opts.texi@1.32 +1 -1
     NTP_4_2_3P57
 
+  sntp/sntp.1@1.35 +2 -2
+    NTP_4_2_3P57
+
   util/ntp-keygen-opts.c@1.35 +4 -4
     NTP_4_2_3P57
 
@@ -202102,6 +205422,9 @@
   sntp/sntp-opts.texi@1.31 +1 -1
     NTP_4_2_3P56
 
+  sntp/sntp.1@1.34 +2 -2
+    NTP_4_2_3P56
+
   util/ntp-keygen-opts.c@1.32 +2 -2
     NTP_4_2_3P56
 
@@ -202196,6 +205519,9 @@
   sntp/sntp-opts.texi@1.30 +1 -1
     NTP_4_2_3P55
 
+  sntp/sntp.1@1.33 +2 -2
+    NTP_4_2_3P55
+
   util/ntp-keygen-opts.c@1.31 +2 -2
     NTP_4_2_3P55
 
@@ -202290,6 +205616,9 @@
   sntp/sntp-opts.texi@1.29 +1 -1
     NTP_4_2_3P54
 
+  sntp/sntp.1@1.32 +2 -2
+    NTP_4_2_3P54
+
   util/ntp-keygen-opts.c@1.30 +2 -2
     NTP_4_2_3P54
 
@@ -202384,6 +205713,9 @@
   sntp/sntp-opts.texi@1.28 +1 -1
     NTP_4_2_3P53
 
+  sntp/sntp.1@1.31 +2 -2
+    NTP_4_2_3P53
+
   util/ntp-keygen-opts.c@1.29 +2 -2
     NTP_4_2_3P53
 
@@ -202469,6 +205801,9 @@
   sntp/sntp-opts.texi@1.27 +1 -1
     NTP_4_2_3P52
 
+  sntp/sntp.1@1.30 +2 -2
+    NTP_4_2_3P52
+
   util/ntp-keygen-opts.c@1.28 +4 -4
     NTP_4_2_3P52
 
@@ -202749,6 +206084,9 @@
   sntp/sntp-opts.texi@1.26 +1 -1
     autogen update
 
+  sntp/sntp.1@1.29 +1 -1
+    autogen update
+
   util/ntp-keygen-opts.c@1.26 +3 -3
     autogen update
 
@@ -202825,6 +206163,9 @@
   sntp/sntp-opts.texi@1.25 +1 -1
     NTP_4_2_3P51
 
+  sntp/sntp.1@1.28 +2 -2
+    NTP_4_2_3P51
+
   util/ntp-keygen-opts.c@1.25 +4 -4
     NTP_4_2_3P51
 
@@ -203104,6 +206445,9 @@
   sntp/sntp-opts.texi@1.24 +1 -1
     autogen upgrade
 
+  sntp/sntp.1@1.27 +2 -2
+    autogen upgrade
+
   util/ntp-keygen-opts.c@1.24 +3 -2
     autogen upgrade
 
@@ -203180,6 +206524,9 @@
   sntp/sntp-opts.texi@1.23 +1 -1
     NTP_4_2_3P50
 
+  sntp/sntp.1@1.26 +2 -2
+    NTP_4_2_3P50
+
   util/ntp-keygen-opts.c@1.23 +43 -43
     NTP_4_2_3P50
 
@@ -203643,6 +206990,9 @@
   sntp/sntp-opts.texi@1.22 +1 -1
     NTP_4_2_3P49
 
+  sntp/sntp.1@1.25 +2 -2
+    NTP_4_2_3P49
+
   util/ntp-keygen-opts.c@1.22 +2 -2
     NTP_4_2_3P49
 
@@ -203737,6 +207087,9 @@
   sntp/sntp-opts.texi@1.21 +1 -1
     NTP_4_2_3P48
 
+  sntp/sntp.1@1.24 +2 -2
+    NTP_4_2_3P48
+
   util/ntp-keygen-opts.c@1.21 +2 -2
     NTP_4_2_3P48
 
@@ -203844,6 +207197,9 @@
   sntp/sntp-opts.texi@1.20 +1 -1
     NTP_4_2_3P47
 
+  sntp/sntp.1@1.23 +2 -2
+    NTP_4_2_3P47
+
   util/ntp-keygen-opts.c@1.20 +2 -2
     NTP_4_2_3P47
 
@@ -203939,6 +207295,9 @@
   sntp/sntp-opts.texi@1.19 +1 -1
     NTP_4_2_3P46
 
+  sntp/sntp.1@1.22 +2 -2
+    NTP_4_2_3P46
+
   util/ntp-keygen-opts.c@1.19 +2 -2
     NTP_4_2_3P46
 
@@ -204036,6 +207395,9 @@
   sntp/sntp-opts.texi@1.18 +1 -1
     NTP_4_2_3P45
 
+  sntp/sntp.1@1.21 +2 -2
+    NTP_4_2_3P45
+
   util/ntp-keygen-opts.c@1.18 +2 -2
     NTP_4_2_3P45
 
@@ -204134,6 +207496,9 @@
   sntp/sntp-opts.texi@1.17 +1 -1
     NTP_4_2_3P44
 
+  sntp/sntp.1@1.20 +2 -2
+    NTP_4_2_3P44
+
   util/ntp-keygen-opts.c@1.17 +2 -2
     NTP_4_2_3P44
 
@@ -204300,6 +207665,9 @@
   sntp/sntp-opts.texi@1.16 +1 -1
     NTP_4_2_3P43
 
+  sntp/sntp.1@1.19 +2 -2
+    NTP_4_2_3P43
+
   util/ntp-keygen-opts.c@1.16 +2 -2
     NTP_4_2_3P43
 
@@ -204382,6 +207750,9 @@
   sntp/sntp-opts.texi@1.15 +1 -1
     NTP_4_2_3P42
 
+  sntp/sntp.1@1.18 +2 -2
+    NTP_4_2_3P42
+
   util/ntp-keygen-opts.c@1.15 +2 -2
     NTP_4_2_3P42
 
@@ -204566,6 +207937,9 @@
   sntp/sntp-opts.texi@1.14 +1 -1
     NTP_4_2_3P41
 
+  sntp/sntp.1@1.17 +2 -2
+    NTP_4_2_3P41
+
   util/ntp-keygen-opts.c@1.14 +2 -2
     NTP_4_2_3P41
 
@@ -204696,6 +208070,9 @@
   sntp/sntp-opts.texi@1.13 +1 -1
     NTP_4_2_3P39
 
+  sntp/sntp.1@1.16 +2 -2
+    NTP_4_2_3P39
+
   util/ntp-keygen-opts.c@1.13 +2 -2
     NTP_4_2_3P39
 
@@ -204847,6 +208224,9 @@
   sntp/sntp-opts.texi@1.12 +1 -1
     NTP_4_2_3P38
 
+  sntp/sntp.1@1.15 +2 -2
+    NTP_4_2_3P38
+
   util/ntp-keygen-opts.c@1.12 +2 -2
     NTP_4_2_3P38
 
@@ -204972,6 +208352,9 @@
   sntp/sntp-opts.texi@1.11 +1 -1
     NTP_4_2_3P37
 
+  sntp/sntp.1@1.14 +2 -2
+    NTP_4_2_3P37
+
   util/ntp-keygen-opts.c@1.11 +2 -2
     NTP_4_2_3P37
 
@@ -205084,6 +208467,9 @@
   sntp/sntp-opts.texi@1.10 +1 -1
     NTP_4_2_3P36
 
+  sntp/sntp.1@1.13 +2 -2
+    NTP_4_2_3P36
+
   util/ntp-keygen-opts.c@1.10 +2 -2
     NTP_4_2_3P36
 
@@ -205167,6 +208553,9 @@
   sntp/sntp-opts.texi@1.9 +1 -1
     NTP_4_2_3P35
 
+  sntp/sntp.1@1.12 +2 -2
+    NTP_4_2_3P35
+
   util/ntp-keygen-opts.c@1.9 +2 -2
     NTP_4_2_3P35
 
@@ -205306,6 +208695,9 @@
   sntp/sntp-opts.texi@1.8 +1 -1
     NTP_4_2_3P34
 
+  sntp/sntp.1@1.11 +2 -2
+    NTP_4_2_3P34
+
   util/ntp-keygen-opts.c@1.8 +2 -2
     NTP_4_2_3P34
 
@@ -205388,6 +208780,9 @@
   sntp/sntp-opts.texi@1.7 +1 -1
     NTP_4_2_3P33
 
+  sntp/sntp.1@1.10 +2 -2
+    NTP_4_2_3P33
+
   util/ntp-keygen-opts.c@1.7 +2 -2
     NTP_4_2_3P33
 
@@ -205553,6 +208948,9 @@
   sntp/sntp-opts.texi@1.6 +1 -1
     run autogen after point release
 
+  sntp/sntp.1@1.9 +2 -2
+    run autogen after point release
+
   util/ntp-keygen-opts.c@1.6 +2 -2
     run autogen after point release
 
@@ -205682,6 +209080,9 @@
   sntp/sntp-opts.texi@1.5 +1 -1
     regenerate autogen-erated files
 
+  sntp/sntp.1@1.8 +2 -2
+    regenerate autogen-erated files
+
   util/ntp-keygen-opts.c@1.5 +29 -4
     regenerate autogen-erated files
 
@@ -205775,6 +209176,9 @@
   sntp/sntp-opts.texi@1.4 +1 -1
     NTP_4_2_3P29
 
+  sntp/sntp.1@1.7 +82 -3
+    NTP_4_2_3P29
+
   util/ntp-keygen-opts.c@1.4 +2 -2
     NTP_4_2_3P29
 
@@ -206267,6 +209671,12 @@
   sntp/sntp-opts.texi@1.2 +0 -0
     Change mode to -rw-r--r--
 
+  sntp/sntp.1@1.6 +129 -64
+    autogen upgrade
+
+  sntp/sntp.1@1.5 +0 -0
+    Change mode to -rw-r--r--
+
   util/ntp-keygen-opts.c@1.3 +54 -36
     autogen upgrade
 
@@ -209044,7 +212454,7 @@
   [Bug 527] Lose signalled IO.
 
   configure.ac@1.359.1.28 +7 -2
-    [Bug 527] Lose signalled IO.
+    [Bug 527] Losed signalled IO.
 
 ChangeSet@1.1251.85.1, 2006-04-18 05:58:13-04:00, stenn@whimsy.udel.edu
   there are 240 ntp-dev patch releases so far
@@ -210493,7 +213903,7 @@
     [Bug 516] unprotected crypto_update() call fix from Dave Mills
 
 ChangeSet@1.1251.67.11, 2005-10-25 20:15:47-04:00, stenn@deacon.udel.edu
-  [Bug 519] Allow dynamic SSL libraries
+  [Bug 517] Allow dynamic SSL libraries
 
   configure.ac@1.359.1.24 +3 -2
     [Bug 519] Allow dynamic SSL libraries: also check /usr/sfw/{lib,include}
@@ -215973,7 +219383,6 @@
 
   ntpdate/ntpdate.c@1.48 +2 -2
     [Bug 363] ntpdate: use -1 to represent an invalid fd
-    Fix from Rainer Weikusat.
 
 ChangeSet@1.1251.1.27, 2004-11-21 21:33:09-05:00, stenn@whimsy.udel.edu
   [Bug 349] Patches from Takao Abe
@@ -216674,6 +220083,9 @@
   sntp/main.c@1.5 +19 -115
     Lose broadcast and server modes.
 
+  sntp/sntp.1@1.4 +0 -23
+    Lose broadcast and server modes.
+
   sntp/socket.c@1.4 +6 -22
     Lose broadcast and server modes.
 
@@ -217061,6 +220473,17 @@
   sntp/main.c@1.4 +8 -8
     added sntp.1 and did a little cleanup
 
+  sntp/sntp.1@1.3 +25 -15
+    added sntp.1 and did a little cleanup
+
+  sntp/sntp.1@1.2 +0 -0
+    Rename: sntp/msntp.1 -> sntp/sntp.1
+
+  sntp/msntp.1@1.1 +325 -0
+
+  sntp/msntp.1@1.0 +0 -0
+    BitKeeper file /deacon/backroom/ntp-dev/sntp/msntp.1
+
 ChangeSet@1.1202.1.15, 2004-08-23 22:08:55-04:00, stenn@www.ntp.org
   make propdelay compile/link
 
--- contrib/ntp/NEWS.orig
+++ contrib/ntp/NEWS
@@ -1,4 +1,112 @@
 ---
+NTP 4.2.8p14 (Harlan Stenn <stenn@ntp.org>, 2020 Mar 03)
+
+Focus: Security, Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+This release fixes three vulnerabilities: a bug that causes causes an ntpd
+instance that is explicitly configured to override the default and allow
+ntpdc (mode 7) connections to be made to a server to read some uninitialized
+memory; fixes the case where an unmonitored ntpd using an unauthenticated
+association to its servers may be susceptible to a forged packet DoS attack;
+and fixes an attack against a client instance that uses a single
+unauthenticated time source.  It also fixes 46 other bugs and addresses
+4 other issues.
+
+* [Sec 3610] process_control() should bail earlier on short packets. stenn@
+  - Reported by Philippe Antoine
+* [Sec 3596] Highly predictable timestamp attack. <stenn@ntp.org>
+  - Reported by Miroslav Lichvar
+* [Sec 3592] DoS attack on client ntpd <perlinger@ntp.org>
+  - Reported by Miroslav Lichvar
+* [Bug 3637] Emit the version of ntpd in saveconfig.  stenn@
+* [Bug 3636] NMEA: combine time/date from multiple sentences <perlinger@ntp.org>
+* [Bug 3635] Make leapsecond file hash check optional <perlinger@ntp.org>
+* [Bug 3634] Typo in discipline.html, reported by Jason Harrison.  stenn@
+* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
+  - implement Zeller's congruence in libparse and libntp <perlinger@ntp.org>
+* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap <perlinger@ntp.org>
+  - integrated patch by Cy Schubert
+* [Bug 3620] memory leak in ntpq sysinfo <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3619] Honour drefid setting in cooked mode and sysinfo <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3617] Add support for ACE III and Copernicus II receivers <perlinger@ntp.org>
+  - integrated patch by Richard Steedman
+* [Bug 3615] accelerate refclock startup <perlinger@ntp.org>
+* [Bug 3613] Propagate noselect to mobilized pool servers <stenn@ntp.org>
+  - Reported by Martin Burnicki
+* [Bug 3612] Use-of-uninitialized-value in receive function <perlinger@ntp.org>
+  - Reported by Philippe Antoine
+* [Bug 3611] NMEA time interpreted incorrectly <perlinger@ntp.org>
+  - officially document new "trust date" mode bit for NMEA driver
+  - restore the (previously undocumented) "trust date" feature lost with [bug 3577] 
+* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter <perlinger@ntp.org>
+  - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
+* [Bug 3608] libparse fails to compile on S11.4SRU13 and later <perlinger@ntp.org>
+  - removed ffs() and fls() prototypes as per Brian Utterback
+* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
+	ntp_io.c <perlinger@ntp.org>
+  - fixed byte and paramter order as suggested by wei6410@sina.com 
+* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no <perlinger@ntp.org>
+* [Bug 3599] Build fails on linux-m68k due to alignment issues <perlinger@ntp.org>
+  - added padding as suggested by John Paul Adrian Glaubitz 
+* [Bug 3594] ntpd discards messages coming through nmead <perlinger@ntp.org>
+* [Bug 3593] ntpd discards silently nmea messages after the 5th string <perlinger@ntp.org>
+* [Bug 3590] Update refclock_oncore.c to the new GPS date API <perlinger@ntp.org>
+* [Bug 3585] Unity tests mix buffered and unbuffered output <perlinger@ntp.org>
+  - stdout+stderr are set to line buffered during test setup now
+* [Bug 3583] synchronization error <perlinger@ntp.org>
+  - set clock to base date if system time is before that limit
+* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled <perlinger@ntp.org>
+* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) <perlinger@ntp.org>
+  - Reported by Paulo Neves
+* [Bug 3577] Update refclock_zyfer.c to the new GPS date API <perlinger@ntp.org>
+  - also updates for refclock_nmea.c and refclock_jupiter.c
+* [Bug 3576] New GPS date function API <perlinger@ntp.org>
+* [Bug 3573] nptdate: missleading error message <perlinger@ntp.org>
+* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo <perlinger@ntp.org>
+* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' <perlinger@ntp.org>
+  - sidekick: service port resolution in 'ntpdate'
+* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH <perlinger@ntp.org>
+  - applied patch by Douglas Royds
+* [Bug 3542] ntpdc monlist parameters cannot be set <perlinger@ntp.org>
+* [Bug 3533] ntpdc peer_info ipv6 issues <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
+* [Bug 3531] make check: test-decodenetnum fails <perlinger@ntp.org>
+  - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
+  - fix wrong cond-compile tests in unit tests
+* [Bug 3517] Reducing build noise <perlinger@ntp.org>
+* [Bug 3516] Require tooling from this decade <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings <perlinger@ntp.org>
+  - patch by Philipp Prindeville
+* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() <perlinger@ntp.org>
+  - partial application of patch by Philipp Prindeville
+* [Bug 3491] Signed values of LFP datatypes should always display a sign
+  - applied patch by Gerry Garvey & fixed unit tests <perlinger@ntp.org>
+* [Bug 3490] Patch to support Trimble Resolution Receivers <perlinger@ntp.org>
+  - applied (modified) patch by Richard Steedman
+* [Bug 3473] RefID of refclocks should always be text format <perlinger@ntp.org>
+  - applied patch by Gerry Garvey (with minor formatting changes)
+* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails <perlinger@ntp.org>
+  - applied patch by Miroslav Lichvar
+* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
+  <perlinger@ntp.org>
+* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
+             is specified with -u <perlinger@ntp.org>
+  - monitor daemon child startup & propagate exit codes
+* [Bug 1433] runtime check whether the kernel really supports capabilities
+  - (modified) patch by Kurt Roeckx <perlinger@ntp.org>
+* Clean up sntp/networking.c:sendpkt() error message.  <stenn@ntp.org>
+* Provide more detail on unrecognized config file parser tokens. <stenn@ntp.org>
+* Startup log improvements. <stenn@ntp.org>
+* Update the copyright year.
+
+---
 NTP 4.2.8p13 (Harlan Stenn <stenn@ntp.org>, 2019 Mar 07)
 
 Focus: Security, Bug fixes, enhancements.
--- contrib/ntp/config.h.in.orig
+++ contrib/ntp/config.h.in
@@ -1215,6 +1215,9 @@
 /* Define if C99-compliant `vsnprintf' is available. */
 #undef HAVE_VSNPRINTF
 
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
 /* Define to 1 if you have the <wchar.h> header file. */
 #undef HAVE_WCHAR_H
 
--- contrib/ntp/configure.orig
+++ contrib/ntp/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ntp 4.2.8p13.
+# Generated by GNU Autoconf 2.69 for ntp 4.2.8p14.
 #
 # Report bugs to <http://bugs.ntp.org./>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='ntp'
 PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p13'
-PACKAGE_STRING='ntp 4.2.8p13'
+PACKAGE_VERSION='4.2.8p14'
+PACKAGE_STRING='ntp 4.2.8p14'
 PACKAGE_BUGREPORT='http://bugs.ntp.org./'
 PACKAGE_URL='http://www.ntp.org./'
 
@@ -1617,7 +1617,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ntp 4.2.8p13 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1687,7 +1687,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ntp 4.2.8p13:";;
+     short | recursive ) echo "Configuration of ntp 4.2.8p14:";;
    esac
   cat <<\_ACEOF
 
@@ -1930,7 +1930,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ntp configure 4.2.8p13
+ntp configure 4.2.8p14
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2639,7 +2639,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ntp $as_me 4.2.8p13, which was
+It was created by ntp $as_me 4.2.8p14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3640,7 +3640,7 @@
 
 # Define the identity of the package.
  PACKAGE='ntp'
- VERSION='4.2.8p13'
+ VERSION='4.2.8p14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -26091,6 +26091,17 @@
 
 done
 
+for ac_func in waitpid
+do :
+  ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
+if test "x$ac_cv_func_waitpid" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WAITPID 1
+_ACEOF
+
+fi
+done
+
 case "$host" in
 *-convex-*)
     for ac_header in /sys/sync/queue.h /sys/sync/sema.h
@@ -33331,6 +33342,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_restrict="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_restrict="no" ;;
+  * ) ;;
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
 $as_echo "$ntp_test_ntp_restrict" >&6; }
  if test x$ntp_test_ntp_restrict = xyes; then
@@ -33350,6 +33365,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_scanner="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_scanner="no" ;;
+  * ) ;;
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
 $as_echo "$ntp_test_ntp_scanner" >&6; }
  if test x$ntp_test_ntp_scanner = xyes; then
@@ -33369,6 +33388,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_signd="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_signd="no" ;;
+  * ) ;;
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
 $as_echo "$ntp_test_ntp_signd" >&6; }
  if test x$ntp_test_ntp_signd = xyes; then
@@ -34151,7 +34174,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ntp $as_me 4.2.8p13, which was
+This file was extended by ntp $as_me 4.2.8p14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -34218,7 +34241,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ntp config.status 4.2.8p13
+ntp config.status 4.2.8p14
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
--- contrib/ntp/configure.ac.orig
+++ contrib/ntp/configure.ac
@@ -1,7 +1,7 @@
 dnl NTP top-level configure.ac				-*- Autoconf -*-
 dnl
 m4_include([sntp/m4/version.m4])
-AC_PREREQ([2.61])
+AC_PREREQ([2.68])
 AC_INIT(
     [ntp],
     [VERSION_NUMBER],
@@ -42,13 +42,10 @@
 
 NTP_CACHEVERSION([main], [$ntp_configure_cache_version])
 
-AM_INIT_AUTOMAKE([1.10 foreign -Wall -Wno-gnu])
+AM_INIT_AUTOMAKE([1.15 foreign -Wall -Wno-gnu])
 
-dnl AM_SILENT_RULES req. automake 1.11.  [yes] defaults V=0
-m4_ifdef(
-    [AM_SILENT_RULES],
-    [AM_SILENT_RULES([yes])]
-)
+AM_SILENT_RULES([yes])
+
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 dnl the 'build' machine is where we run configure and compile
@@ -382,6 +379,7 @@
 esac
 AC_CHECK_HEADERS([sys/stat.h sys/stream.h stropts.h sys/stropts.h sys/syssgi.h])
 AC_CHECK_HEADERS([sys/systune.h sys/termios.h sys/tpro.h sys/wait.h])
+AC_CHECK_FUNCS([waitpid])
 case "$host" in
 *-convex-*)
     AC_CHECK_HEADERS([/sys/sync/queue.h /sys/sync/sema.h])
--- contrib/ntp/html/accopt.html.orig
+++ contrib/ntp/html/accopt.html
@@ -55,8 +55,10 @@
     </dl>
   </dd>
   <dt id="restrict"><tt>restrict [-4 | -6] default [ippeerlimit <i>num</i>]
-      [<i>flag</i>][...]<br>  restrict source [ippeerlimit <i>num</i>]
-      [<i>flag</i>][...]<br>  restrict <i>address</i> [mask <i>mask</i>]
+      [<i>flag</i>][...]</tt></dt>
+  <dt><tt>restrict source [ippeerlimit <i>num</i>]
+      [<i>flag</i>][...]</tt></dt>
+  <dt><tt>restrict <i>address</i> [mask <i>mask</i>]
       [ippeerlimit <i>num</i>] [<i>flag</i>][...]</tt></dt>
   <dd>The <tt><i>address</i></tt> argument expressed in IPv4 or IPv6 numeric
     address form is the address of a host or network. Alternatively,
@@ -168,6 +170,9 @@
         UDP port (123). A restrict line containing <tt>ntpport</tt> is
         considered more specific than one with the same address and mask,
         but lacking <tt>ntpport</tt>.</dd>
+      <dt><tt>serverresponse fuzz</tt></dt>
+      <dd>When reponding to server requests, fuzz the low order bits of
+	the <tt>reftime</tt>.</dd>
       <dt><tt>version</tt></dt>
       <dd>Deny packets that do not match the current NTP version.</dd>
     </dl>
--- contrib/ntp/html/clockopt.html.orig
+++ contrib/ntp/html/clockopt.html
@@ -10,7 +10,7 @@
 <h3>Reference Clock Commands and Options</h3>
 <img src="pic/stack1a.jpg" alt="gif" align="left">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->11-Sep-2010  05:55<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->26-Sep-2019  06:34<!-- #EndDate -->
   UTC</p>
 <br clear="left">
 <h4>Related Links</h4>
@@ -50,6 +50,22 @@
       <dd>Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.</dd>
       <dt><tt>flag1 flag2 flag3 flag4</tt></dt>
       <dd>These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular  driver. However, by convention <tt>flag4</tt> is used to enable recording monitoring data to the <tt>clockstats</tt> file configured with the <tt>filegen</tt> command. Additional information on the <tt>filegen</tt> command is on the <a href="monopt.html">Monitoring Options</a> page.</dd>
+      <dt><tt>minjitter <i>secs</i></tt></dt>
+      <dd>If the source has a jitter that cannot be sensibly estimated, because
+	it is not statistic jitter, the source will be detected as falseticker
+	sooner or later.  This has been observed e.g. with the serial data of
+	certain GPS receivers.  Enforcing a minimal jitter value avoids a too
+	low estimation, keeping the clock in the zoo while still detecting
+	higher jitter.
+      </dd><dd> Note: this changes the refclock samples and ends up in the
+	clock dispersion, not the clock jitter, despite being called jitter.  To
+	see the modified values, check the NTP clock variable "filtdisp", not
+	"jitter".
+      </dd><dd>The falseticker problem can also be avoided by increasing <tt>tos
+	mindist</tt>, which extends the intersection interval, but that affects
+	the root dispersion and is intended for the case of multiple reference
+	clocks with reliable jitter that do not intersect otherwise.
+      </dd>
     </dl>
   </dd>
 </dl>
--- contrib/ntp/html/confopt.html.orig
+++ contrib/ntp/html/confopt.html
@@ -13,7 +13,7 @@
 Walt Kelly</a>
 <p>The chicken is getting configuration advice.</p>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->24-Jul-2018  07:27<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->13-Feb-2020  10:08<!-- #EndDate -->
     UTC</p>
 <br clear="left">
 <h4>Related Links</h4>
@@ -33,12 +33,12 @@
 	support for the IPv6 address family is generated in addition to the default IPv4 address family. IPv6 addresses can be identified by the presence of colons &quot;:&quot; in the address field. IPv6 addresses can be used almost everywhere where IPv4 addresses can be used, with the exception of reference clock addresses, which are always IPv4. Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
 <h4 id="command">Server Commands</h4>
 <p>Unless noted otherwise, further information about these commands is on the <a href="assoc.html">Association Management</a> page.</p><dl>
-	<dt id="server"><tt>server <i>address</i> [options ...]</tt><br>
-		<tt>peer <i>address</i> [options ...]</tt><br>
-		<tt>broadcast <i>address</i> [options ...]</tt><br>
-		<tt>manycastclient <i>address</i> [options ...]</tt><br>
-		<tt>pool <i>address</i> [options ...]</tt><br>
-		<tt>unpeer [<i>address</i> | <i>associd</i>]</tt></dt>
+	<dt id="server"><tt>server <i>address</i> [options ...]</tt></dt>
+	<dt><tt>peer <i>address</i> [options ...]</tt></dt>
+	<dt><tt>broadcast <i>address</i> [options ...]</tt></dt>
+	<dt><tt>manycastclient <i>address</i> [options ...]</tt></dt>
+	<dt><tt>pool <i>address</i> [options ...]</tt></dt>
+	<dt><tt>unpeer [<i>address</i> | <i>associd</i>]</tt></dt>
 	<dd>These commands specify the remote server name or address to be used and the mode in which to operate. The <i>address</i> can be either a DNS name or a IPv4 or IPv6 address in standard notation. In general, multiple commands of each type can be used for different server and peer addresses or multicast groups.
 		<dl>
 			<dt><tt>server</tt></dt>
@@ -67,8 +67,14 @@
     <dt><tt>ident</tt> <em><tt>group</tt></em></dt>
     <dd>Specify the group name for the association.  See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
   <dt><tt>key</tt> <i><tt>key</tt></i></dt>
-  <dd>Send and receive packets authenticated by the symmetric key scheme described in the <a href="authentic.html">Authentication Support</a> page. The <i><tt>key</tt></i> specifies the key identifier with values from 1 to 65535, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd>	<dt><tt>minpoll <i>minpoll<br>
-	</i></tt><tt>maxpoll <i>maxpoll</i></tt></dt>
+  <dd>Send and receive packets authenticated by the symmetric key scheme
+  described in the <a href="authentic.html">Authentication Support</a>
+  page. The <i><tt>key</tt></i> specifies the key identifier with values
+  from 1 to 65535, inclusive. This option is mutually exclusive with
+  the <tt>autokey</tt>
+  option.</dd>
+	<dt><tt>minpoll <i>minpoll</i></tt></dt>
+	<dt><tt>maxpoll <i>maxpoll</i></tt></dt>
 	<dd>These options specify the minimum and maximum poll intervals for NTP messages, in seconds as a power of two. The maximum poll interval defaults to 10 (1024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36 hr). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 3 (8 s).  Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
 	<dt><tt>mode <i>option</i></tt></dt>
 	<dd>Pass the <tt><i>option</i></tt> to a reference clock driver, where <tt><i>option</i></tt> is an integer in the range from 0 to 255, inclusive. This option is valid	only with type r addresses.</dd>
@@ -87,6 +93,13 @@
 outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default.</dd>
 	<dt><tt>xleave</tt></dt>
 	<dd>Operate in interleaved mode (symmetric and broadcast modes only). Further information is on the <a href="xleave.html">NTP Interleaved Modes</a> page.</dd>
+	<dt><tt>xmtnonce</tt></dt>
+	<dd>Allowed in the server and pool modes, this flag causes the
+	  client to put a random number nonce in the transmit timestamp of
+	  its outgoing packet.  Since the server will reply copying the
+	  incoming transmit timestamp to the outgoing origin timestamp, this
+	  flag provides extra security for the loopback test, at the expense
+	  of the server having no idea what time the client thinks it is.</dd>
 </dl>
 <h4 id="aux">Auxiliary Commands</h4>
 <dl>
--- contrib/ntp/html/copyright.html.orig
+++ contrib/ntp/html/copyright.html
@@ -3,7 +3,6 @@
 <head>
 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
 <title>Copyright Notice</title>
-<!-- Changed by: Harlan Stenn, 10-Mar-2014 -->
 <link href="scripts/style.css" type="text/css" rel="stylesheet">
 </head>
 <body>
@@ -10,7 +9,7 @@
 <h3>Copyright Notice</h3>
 <img src="pic/sheepb.jpg" alt="jpg" align="left"> "Clone me," says Dolly sheepishly.
 <p>Last update:
-  <!-- #BeginDate format:En2m -->2-Jan-2017  11:58<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->4-Feb-2020  23:47<!-- #EndDate -->
     UTC</p>
 <br clear="left">
 </p>
@@ -39,7 +38,7 @@
 <pre>
 ***********************************************************************
 *                                                                     *
-* Copyright (c) Network Time Foundation 2011-2017                     *
+* Copyright (c) Network Time Foundation 2011-2020                     *
 *                                                                     *
 * All Rights Reserved                                                 *
 *                                                                     *
--- contrib/ntp/html/discipline.html.orig
+++ contrib/ntp/html/discipline.html
@@ -4,12 +4,13 @@
 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
 <meta name="generator" content="HTML Tidy, see www.w3.org">
 <title>Clock Discipline Algorithm</title>
+<!-- Changed by: stenn, 03-Jan-2020 -->
 <link href="scripts/style.css" type="text/css" rel="stylesheet">
 </head>
 <body>
 <h3>Clock Discipline Algorithm</h3>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->10-Mar-2014  05:03<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->3-Jan-2020  02:12<!-- #EndDate -->
     UTC</p>
 <h4>Table of Contents</h4>
 <ul>
@@ -20,29 +21,29 @@
 </ul>
 <hr>
 <h4 id="intro">General Overview</h4>
-<p>At the heart of the NTP specification and reference implementation is the clock discipline algorithm, which is best described as an adaptive parameter, hybrid phase/frequency-lock feedback loop. It is an intricately crafted algorithm that automatically  adapts  for optimum performance while  minimizing network overhead. Operation is in two modes, phase-lock loop (PLL), which is used at poll intervals  below the Allan intercept, by default 2048 s, and frequency-lock loop (FLL), which is used above that.</p>
+<p>At the heart of the NTP specification and reference implementation is the clock discipline algorithm, which is best described as an adaptive parameter, hybrid phase/frequency-lock feedback loop.  It is an intricately crafted algorithm that automatically adapts for optimum performance while minimizing network overhead.  Operation is in two modes, phase-lock loop (PLL), which is used at poll intervals below the Allan intercept, by default 2048 s, and frequency-lock loop (FLL), which is used above that.</p>
 <div align="center"> <img src="pic/discipline.gif" alt="gif">
   <p>Figure 1. Clock Discipline Algorithm</p>
 </div>
 <h4 id="pll">Clock Discipline Operations</h4>
-<p>A block diagram of the clock discipline is shown in Figure 1. The timestamp of a reference clock or remote server is compared with the timestamp of the system clock, represented as a variable frequency oscillator (VFO), to produce a raw offset sample <em>V<sub>d</sub></em>. Offset samples are processed by the clock filter to produce a filtered update <em>V<sub>s</sub></em>. The loop filter implements a type-2  proportional-integrator controller (PIC). The PIC can  minimize errors in both time and frequency using predictors <em>x</em> and <em>y</em>, respectively. The clock adjust process samples these predictors once each second for the daemon discipline or once each tick interrupt for the kernel discipline to produce the system clock  update <em>V<sub>c</sub></em>.</p>
-<p>In PLL mode the frequency predictor is an integral of the offset over past updates, while the phase predictor is the offset amortized over time in order to  avoid  setting the clock backward. In FLL mode the phase predictor is not used, while the frequency predictor is similar to the  NIST <em>lockclock</em> algorithm. In this algorithm, the frequency predictor is computed as a fraction of the current offset divided by the time since the last update in order to  minimize the offset at the next update.</p>
-<p>The discipline  response  in PLL mode is determined by  the <em>time constant</em>, which results in a &quot;stiffness&quot; depending on the   jitter  of the available sources and the wander of the system clock oscillator. The  scaled time constant is also used as the poll interval  described on the <a href="poll.html">Poll Program</a> page. However, in  NTP symmetric mode, each   peer manages its own poll interval and the two  might not be the same. In such cases either peer uses the minimum of its own poll interval and that of the other peer, which is included in the NTP  packet header.</p>
+<p>A block diagram of the clock discipline is shown in Figure 1.  The timestamp of a reference clock or remote server is compared with the timestamp of the system clock, represented as a variable frequency oscillator (VFO), to produce a raw offset sample <em>V<sub>d</sub></em>.  Offset samples are processed by the clock filter to produce a filtered update <em>V<sub>s</sub></em>.  The loop filter implements a type-2 proportional-integrator controller (PIC).  The PIC can minimize errors in both time and frequency using predictors <em>x</em> and <em>y</em>, respectively.  The clock adjust process samples these predictors once each second for the daemon discipline or once each tick interrupt for the kernel discipline to produce the system clock update <em>V<sub>c</sub></em>.</p>
+<p>In PLL mode the frequency predictor is an integral of the offset over past updates, while the phase predictor is the offset amortized over time in order to avoid setting the clock backward.  In FLL mode the phase predictor is not used, while the frequency predictor is similar to the NIST <em>lockclock</em> algorithm.  In this algorithm, the frequency predictor is computed as a fraction of the current offset divided by the time since the last update in order to minimize the offset at the next update.</p>
+<p>The discipline response in PLL mode is determined by the <em>time constant</em>, which results in a &quot;stiffness&quot; depending on the jitter of the available sources and the wander of the system clock oscillator.  The scaled time constant is also used as the poll interval described on the <a href="poll.html">Poll Program</a> page.  However, in NTP symmetric mode, each peer manages its own poll interval and the two might not be the same.  In such cases either peer uses the minimum of its own poll interval and that of the other peer, which is included in the NTP packet header.</p>
 <h4 id="loop">Loop Dynamics</h4>
-<p> It is necessary to verify that the clock discipline algorithm is stable and satisfies the Nyquist criterion, which requires that the sampling rate be at least twice the bandwidth. In this case the bandwidth can be approximated by the reciprocal of the time constant. In the NTP specification and reference implementation, time constants and poll intervals are  expressed as exponents of 2. By construction, the time constant exponent is five times the poll interval exponent.  Thus, the default poll exponent of 6 corresponds to a poll interval of 64 s and a time constant of 2048 s. A change  in the poll interval changes the time constant by a corresponding amount.. The Nyquist criterion requires the  sample interval to be not more than half the time constant or 1024 s. The clock filter guarantees at least one sample in eight poll intervals, so the sample interval is not more than 512 s. This would be described as oversampling by a factor of two. Finally, the PLL parameters have been chosen for a damping factor of 2, which results in a much faster risetime than with critical damping, but results in modest overshoot of  6 percent.</p>
-<p> It is important to understand how the dynamics of the PLL are affected by the time constant and poll interval. At the default poll interval of 64 s and a step offset  change of 100 ms, the time response crosses zero in about 50 min and overshoots about 6 ms, as per design. Ordinarily, a step correction would causes a temporary frequency  surge of about 5 PPM, which  along with the overshoot slowly dissipates over a few hours.</p>
-<p>However, the clock state machine used with the discipline algorithm avoids this transient at startup. It does this using a previously saved frequency file, if present, or by measuring the oscillator frequency, if not. It then quickly amortizes the residual offset at startup without affecting the oscillator frequency. In this way the offset error is less than 0.5 ms within 5 min, if the file is present, and within 10 min if not. See the <a href="clock.html">Clock State Machine</a> page for further details.</p>
-<p>Since the PLL is linear, the response with different offset step amplitudes and poll intervals has the same characteristic shape, but scaled differently in amplitude and time. The response scales exactly with step amplitude, so that the response to  a 10-ms step has the same shape as at 64 s, but with amplitude  compressed by one-tenth. The response scales exactly with poll interval, so that response at a poll interval of 8 s  has the same shape as at 64 s, but with  time compressed by  one-eighth.</p>
-<p>The optimum time constant, and thus the poll interval, depends on the network time jitter and the  oscillator frequency wander. Errors due to jitter decrease as the time constant increases, while errors due to wander decrease as the time constant decreases. For typical Internet paths, the two error characteristics intersect at a point called the <em>Allan intercept</em>, which represents the optimum time constant. With a compromise Allan intercept of 2048 s, the optimum poll interval is about 64 s, which corresponds to a compromise poll exponent of 6. For fast LANs with modern computers, the Allan intercept is somewhat lower at around 512 s, so a compromise poll exponent of 4 (16 s) is appropriate. An intricate, heuristic algorithm is used to manage the actual poll interval within a specified range. Details are on the <a href="poll.html">Poll Program</a> page.</p>
-<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering  severe network congestion. In extreme cases not likely to be encountered in normal operation, the system time can be stepped forward or backward more than 128 ms. Further details are on the <a href="clock.html">Clock State Machine</a> page.</p>
+<p> It is necessary to verify that the clock discipline algorithm is stable and satisfies the Nyquist criterion, which requires that the sampling rate be at least twice the bandwidth.  In this case the bandwidth can be approximated by the reciprocal of the time constant.  In the NTP specification and reference implementation, time constants and poll intervals are expressed as exponents of 2.  By construction, the time constant exponent is five times the poll interval exponent.  Thus, the default poll exponent of 6 corresponds to a poll interval of 64 s and a time constant of 2048 s.  A change in the poll interval changes the time constant by a corresponding amount..  The Nyquist criterion requires the sample interval to be not more than half the time constant or 1024 s.  The clock filter guarantees at least one sample in eight poll intervals, so the sample interval is not more than 512 s.  This would be described as oversampling by a factor of two.  Finally, the PLL parameters have been chosen for a damping factor of 2, which results in a much faster risetime than with critical damping, but results in modest overshoot of 6 percent.</p>
+<p> It is important to understand how the dynamics of the PLL are affected by the time constant and poll interval.  At the default poll interval of 64 s and a step offset change of 100 ms, the time response crosses zero in about 50 min and overshoots about 6 ms, as per design.  Ordinarily, a step correction would causes a temporary frequency surge of about 5 PPM, which along with the overshoot slowly dissipates over a few hours.</p>
+<p>However, the clock state machine used with the discipline algorithm avoids this transient at startup.  It does this using a previously saved frequency file, if present, or by measuring the oscillator frequency, if not.  It then quickly amortizes the residual offset at startup without affecting the oscillator frequency.  In this way the offset error is less than 0.5 ms within 5 min, if the file is present, and within 10 min if not.  See the <a href="clock.html">Clock State Machine</a> page for further details.</p>
+<p>Since the PLL is linear, the response with different offset step amplitudes and poll intervals has the same characteristic shape, but scaled differently in amplitude and time.  The response scales exactly with step amplitude, so that the response to a 10-ms step has the same shape as at 64 s, but with amplitude compressed by one-tenth.  The response scales exactly with poll interval, so that response at a poll interval of 8 s has the same shape as at 64 s, but with time compressed by one-eighth.</p>
+<p>The optimum time constant, and thus the poll interval, depends on the network time jitter and the oscillator frequency wander.  Errors due to jitter decrease as the time constant increases, while errors due to wander decrease as the time constant decreases.  For typical Internet paths, the two error characteristics intersect at a point called the <em>Allan intercept</em>, which represents the optimum time constant.  With a compromise Allan intercept of 2048 s, the optimum poll interval is about 64 s, which corresponds to a compromise poll exponent of 6.  For fast LANs with modern computers, the Allan intercept is somewhat lower at around 512 s, so a compromise poll exponent of 4 (16 s) is appropriate.  An intricate, heuristic algorithm is used to manage the actual poll interval within a specified range.  Details are on the <a href="poll.html">Poll Program</a> page.</p>
+<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering severe network congestion.  In extreme cases not likely to be encountered in normal operation, the system time can be stepped forward or backward more than 128 ms.  Further details are on the <a href="clock.html">Clock State Machine</a> page.</p>
 <h4 id="house">Clock Initialization and Management</h4>
-<p>If left running continuously, an NTP client on a fast LAN in a home or office environment can  maintain synchronization  nominally within one millisecond. When the ambient temperature variations are less than a degree Celsius,  the clock oscillator frequency is  disciplined to within one part per million (PPM), even when the   clock oscillator native  frequency offset is 100 PPM or more.</p>
-<p> For laptops and portable devices when the power is turned off,  the   battery backup clock offset error can increase   as much as one second  per day. When  power is restored after  several hours or days,  the  clock offset and oscillator frequency   errors must be resolved by the clock discipline algorithm, but this can take several hours without specific provisions.</p>
-<p> The provisions described in this section insure that, in all but pathological situations, the startup transient is suppressed to within nominal levels in no more than five minutes after a warm start or ten minutes after a cold start. Following is a summary of these provisions. A detailed discussion of these provisions is on the <a href="clock.html">Clock State Machine</a> page.</p>
-<p> The reference implementation   measures the clock oscillator frequency  and updates a frequency  file  at intervals of one hour or more, depending on the measured frequency wander. This design is intended to minimize  write cycles in NVRAM that might  be used in a laptop or portable device. In a warm start, the frequency is initialized from this file, which avoids a possibly lengthy convergence time. In a cold start when no frequency file is available, the reference implementation first measures the   oscillator frequency  over a five-min interval. This generally results in a residual frequency error  less than  1 PPM. The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
-<p>In order to  reduce the  clock offset error at restart, the reference implementation  mext disables oscillator frequency discipline and enables clock offset discipline with a small time constant. This  is designed to quickly reduce the clock offset error without causing a frequency surge. This configuration is continued for an interval of five-min, after which the  clock offset error is usually  no more than a millisecond. The  measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
-<p>Another  concern at  restart is the  time necessary for  the select and cluster algorithms to refine and validate the initial  clock offset estimate. Normally, this takes several updates before setting the system clock. As the default minimum poll interval in most configurations is about one minute, it can take several minutes before setting the system clock. The <tt>iburst</tt> option of the <a href="confopt.html#burst"><tt>server</tt></a> command  changes the behavior at restart and is    recommended for client/server configurations.  When this option is enabled, the client  sends a volley of six requests at intervals of two seconds. This usually insures a reliable estimate is available in about ten seconds before setting the clock. Once this initial volley is complete, the procedures described above are executed.</p>
-<p>As a result of the above considerations, when a backup source, such as the local clock driver, ACTS modem driver or orphan mode is included in the system configuration, it may happen that one or more of them are selectable before one or more of the  regular sources are selectable. When backup sources are included in the configuration, the  reference implementation waits an interval of several minutes without regular sources before switching to backup sources. This is generally enough to avoid startup transients due to premature switching to backup sources. The interval can be changed using the <tt>orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<p>If left running continuously, an NTP client on a fast LAN in a home or office environment can maintain synchronization nominally within one millisecond.  When the ambient temperature variations are less than a degree Celsius, the clock oscillator frequency is disciplined to within one part per million (PPM), even when the clock oscillator native frequency offset is 100 PPM or more.</p>
+<p> For laptops and portable devices when the power is turned off, the battery backup clock offset error can increase as much as one second per day.  When power is restored after several hours or days, the clock offset and oscillator frequency errors must be resolved by the clock discipline algorithm, but this can take several hours without specific provisions.</p>
+<p> The provisions described in this section insure that, in all but pathological situations, the startup transient is suppressed to within nominal levels in no more than five minutes after a warm start or ten minutes after a cold start.  Following is a summary of these provisions.  A detailed discussion of these provisions is on the <a href="clock.html">Clock State Machine</a> page.</p>
+<p> The reference implementation measures the clock oscillator frequency and updates a frequency file at intervals of one hour or more, depending on the measured frequency wander.  This design is intended to minimize write cycles in NVRAM that might be used in a laptop or portable device.  In a warm start, the frequency is initialized from this file, which avoids a possibly lengthy convergence time.  In a cold start when no frequency file is available, the reference implementation first measures the oscillator frequency over a five-min interval.  This generally results in a residual frequency error less than 1 PPM.  The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>In order to reduce the clock offset error at restart, the reference implementation next disables oscillator frequency discipline and enables clock offset discipline with a small time constant.  This is designed to quickly reduce the clock offset error without causing a frequency surge.  This configuration is continued for an interval of five-min, after which the clock offset error is usually no more than a millisecond.  The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>Another concern at restart is the time necessary for the select and cluster algorithms to refine and validate the initial clock offset estimate.  Normally, this takes several updates before setting the system clock.  As the default minimum poll interval in most configurations is about one minute, it can take several minutes before setting the system clock.  The <tt>iburst</tt> option of the <a href="confopt.html#burst"><tt>server</tt></a> command changes the behavior at restart and is recommended for client/server configurations.  When this option is enabled, the client sends a volley of six requests at intervals of two seconds.  This usually insures a reliable estimate is available in about ten seconds before setting the clock.  Once this initial volley is complete, the procedures described above are executed.</p>
+<p>As a result of the above considerations, when a backup source, such as the local clock driver, ACTS modem driver or orphan mode is included in the system configuration, it may happen that one or more of them are selectable before one or more of the regular sources are selectable.  When backup sources are included in the configuration, the reference implementation waits an interval of several minutes without regular sources before switching to backup sources.  This is generally enough to avoid startup transients due to premature switching to backup sources.  The interval can be changed using the <tt>orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
 <hr>
 <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
 </body>
--- contrib/ntp/html/drivers/driver20.html.orig
+++ contrib/ntp/html/drivers/driver20.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
     <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Generic NMEA GPS Receiver</title>
-    <!-- Changed by: Harlan &, 31-Mar-2014 -->
+    <!-- Changed by: Pearly &, 04-Feb-2019 -->
     <link href="scripts/style.css" type="text/css" rel="stylesheet">
     <style type="text/css">
       table.dlstable { font-size:85%; }
@@ -13,7 +13,7 @@
   <body>
     <h3>Generic NMEA GPS Receiver</h3>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->31-Mar-2014  03:55<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->13-Jan-2020  07:12<!-- #EndDate -->
   UTC</p>
     <hr>
     <h4>Synopsis</h4>
@@ -41,6 +41,9 @@
       second insertion in UTC.&nbsp; To avoid problems mixing UTC and GPS
       timescales, the driver disables processing of UTC sentences
       once <tt>$GPZDG</tt> is received.
+      <br>
+      <strong>Caveat:</strong> Please see <a href="#talkerids">Talker
+      IDs</a> when using non-GPS or multi-system receivers.
     </p>
     <p>
       The driver expects the receiver to be set up to transmit at least one
@@ -80,7 +83,14 @@
       </tr><tr>
 	<td class="ttf">$GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS&lt;cr&gt;&lt;lf&gt;</td>
 	<td>Accord</td>
-      </tr>
+      </tr><tr>
+      </tr><tr>
+	<td class="ttf">$PGRMF,gpsWk,gpsTow,DATE,UTC,LEAPS,LAT,LAT_REF,LON,LON_REF,TYPE,MODE,SPD,HDOP,TDOP*CS&lt;cr&gt;&lt;lf&gt;</td>
+	<td>Garmin</td>
+      </tr><tr>
+	  <td class="ttf">$PUBX,04,UTC,DATE,utcTow,utcWk,LEAPS,clkBias,clkDrift,tpGran,*CS&lt;cr&gt;&lt;lf&gt;</td>
+	  <td>UBLOX</td>
+      </tr>	
     </tbody></table></p>
 
     <p><table class="dlstable" border="1">
@@ -91,78 +101,96 @@
       </tr>
       
       <tr>
-	<td class="ttf">UTC</td>
-	<td>Time of day on UTC timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])</td>
+	<td class="ttf">ALT</td>
+	<td>Antenna Altitude</td>
       </tr><tr>
-	<td class="ttf">POS_STAT</td>
-	<td>Position status. (A = Data valid, V = Data invalid)</td>
+	<td class="ttf">ALT_UNIT</td>
+	<td>Altitude Units (Metres/Feet)</td>
       </tr><tr>
-	<td class="ttf">LAT</td>
-	<td>Latitude (llll.ll)</td>
+	<td class="ttf">DATE</td>
+	<td>Date (ddmmyy)</td>
       </tr><tr>
-	<td class="ttf">LAT_REF</td>
-	<td>Latitude direction. (N = North, S = South)</td>
+	<td class="ttf">DD</td>
+	<td>Day of the month (1-31)</td>
       </tr><tr>
-	<td class="ttf">LON</td>
-	<td>Longitude (yyyyy.yy)</td>
+	<td class="ttf">D_AGE</td>
+	<td>Age of last DGPS Fix</td>
       </tr><tr>
-	<td class="ttf">LON_REF</td>
-	<td>Longitude direction (E = East, W = West)</td>
+	<td class="ttf">D_REF</td>
+	<td>Reference ID of DGPS station</td>
       </tr><tr>
-	<td class="ttf">SPD</td>
-	<td>Speed over ground. (knots) (x.x)</td>
+	<td class="ttf">FIX_MODE</td>
+	<td>Position Fix Mode (0 = Invalid, &gt;0 = Valid)</td>
       </tr><tr>
-	<td class="ttf">HDG</td>
-	<td>Heading/track made good (degrees True) (x.x)</td>
+	<td class="ttf">GEO</td>
+	<td>Geoid/Elipsoid separation</td>
       </tr><tr>
-	<td class="ttf">DATE</td>
-	<td>Date (ddmmyy)</td>
+	<td class="ttf">GPSTIME</td>
+	<td>Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)] (hhmmss[.f])</td>
       </tr><tr>
-	<td class="ttf">MAG_VAR</td>
-	<td>Magnetic variation (degrees) (x.x)</td>
+	<td class="ttf">gpsTow</td>
+	<td>GPS week time, seconds since start of GPS week (0..604799)</td>
       </tr><tr>
-	<td class="ttf">MAG_REF</td>
-	<td>Magnetic variation (E = East, W = West)</td>
+	<td class="ttf">gpsWk</td>
+	<td>Week number in the GPS time scale (may exceed 1024)</td>
       </tr><tr>
-	<td class="ttf">FIX_MODE</td>
-	<td>Position Fix Mode (0 = Invalid, &gt;0 = Valid)</td>
+	<td class="ttf">G_UNIT</td>
+	<td>Geoid units (M/F)</td>
       </tr><tr>
-	<td class="ttf">SAT_USED</td>
-	<td>Number of Satellites used in solution</td>
+	<td class="ttf">HDG</td>
+	<td>Heading/track made good (degrees True) (x.x)</td>
       </tr><tr>
 	<td class="ttf">HDOP</td>
 	<td>Horizontal Dilution of Precision</td>
       </tr><tr>
-	<td class="ttf">ALT</td>
-	<td>Antenna Altitude</td>
+	<td class="ttf">LAT</td>
+	<td>Latitude (llll.ll)</td>
       </tr><tr>
-	<td class="ttf">ALT_UNIT</td>
-	<td>Altitude Units (Metres/Feet)</td>
+	<td class="ttf">LAT_REF</td>
+	<td>Latitude direction (N = North, S = South)</td>
       </tr><tr>
-	<td class="ttf">GEO</td>
-	<td>Geoid/Elipsoid separation</td>
+	<td class="ttf">LEAPS</td>
+	<td>Leap seconds or difference between GPS time scale and UTC</td>
       </tr><tr>
-	<td class="ttf">G_UNIT</td>
-	<td>Geoid units (M/F)</td>
+	<td class="ttf">LON</td>
+	<td>Longitude (yyyyy.yy)</td>
       </tr><tr>
-	<td class="ttf">D_AGE</td>
-	<td>Age of last DGPS Fix</td>
+	<td class="ttf">LON_REF</td>
+	<td>Longitude direction (E = East, W = West)</td>
       </tr><tr>
-	<td class="ttf">D_REF</td>
-	<td>Reference ID of DGPS station</td>
+	<td class="ttf">MAG_REF</td>
+	<td>Magnetic variation (E = East, W = West)</td>
       </tr><tr>
-	<td class="ttf">GPSTIME</td>
-	<td>Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.f])</td>
+	<td class="ttf">MAG_VAR</td>
+	<td>Magnetic variation (degrees) (x.x)</td>
       </tr><tr>
-	<td class="ttf">DD</td>
-	<td>Day of the month (1-31)</td>
-      </tr><tr>
 	<td class="ttf">MM</td>
 	<td>Month of the year (1-12)</td>
       </tr><tr>
+	<td class="ttf">POS_STAT</td>
+	<td>Position status. (A = Data valid, V = Data invalid)</td>
+      </tr><tr>
+	<td class="ttf">SAT_USED</td>
+	<td>Number of Satellites used in solution</td>
+      </tr><tr>
+	<td class="ttf">SPD</td>
+	<td>Speed over ground. (knots) (x.x)</td>
+      </tr><tr>
+	<td class="ttf">UTC</td>
+	<td>Time of day on UTC timescale. Hours, minutes and seconds [fraction (opt.)] (hhmmss[.fff])</td>
+      </tr><tr>
 	<td class="ttf">YYYY</td>
 	<td>Year</td>
       </tr><tr>
+	<td class="ttf">WEEK</td>
+	<td>GPS week (0-1023)</td>
+      </tr><tr>
+	<td class="ttf">WSEC</td>
+	<td>Seconds since start of week (0-604799)</td>
+      </tr><tr>
+	<td class="ttf">LEAP</td>
+	<td>GPS leap seconds, that is, seconds ahead of UTC</td>
+      </tr><tr>
 	<td class="ttf">AA.BB</td>
 	<td>Denotes the signal strength (should be &lt; 05.00)</td>
       </tr><tr>
@@ -181,6 +209,36 @@
     </tbody></table></p>
 
 
+    <h4><a name="talkerids"/>NMEA Talker IDs</h4>
+    
+    <p>
+      GNSS receivers use a distinct talker ID for the GNSS they
+      process. Receivers capable of tracking different systems at the same time
+      can emit <tt>$GPRMC</tt> (GPS), <tt>$GLRMC</tt> (GLONASS),
+      <tt>$GARMC</tt> (Galileo), <tt>$GNRMC</tt> (generic/combined) and others
+      all in one data stream.
+    </p><p>
+      The driver supports this to a certain degree by ignoring the
+      talker ID on the standard sentences RMC, GLL, GGA, ZDA and ZDG. (It
+      possibly should not do that on the latter, but for now, that's the way
+      it is.) So whenever <tt>$GPRMC</tt> is mentioned in this document,
+      substitute any possible talker ID your receiver might emit -- it will
+      still match.
+    </p><p>
+      This approach has a drawback. It is easy to use for single-system
+      receivers, but it cannot separate the data streams for multi-system
+      receiver modules. It is therefore undefined which GNSS actually
+      provides the data, and this can lead to strange behavior. This is
+      especially true if the different GNSS provide very different signal
+      quality to the receiver; the driver is not able to cherry-pick the best
+      source and might actually end up in using the worst available.  It is
+      therefore recommended to set up such a receiver to either use just a
+      single GNSS (which would defeat its purpose) or to emit only the
+      combined data, which usually has the <tt>GN</tt> talker ID defined by
+      the NMEA standard.
+    <p>
+
+    
     <h4>The 'mode' byte</h4>
     
     <p>
@@ -202,7 +260,7 @@
 	<td align="center">0</td>
 	<td align="center">1</td>
 	<td align="center">1</td>
-	<td>process <tt>$GPMRC</tt></td>
+	<td>process <tt>$GPRMC</tt></td>
       </tr><tr>
 	<td align="center">1</td>
 	<td align="center">2</td>
@@ -259,9 +317,14 @@
         <td align="center">0x100</td>
 	<td>process <tt>$PGRMF</tt></td>
       </tr><tr>
-        <td align="center">9-15</td>
+        <td align="center">9</td>
+        <td align="center">512</td>
+        <td align="center">0x200</td>
+	<td>process <tt>$PUBX,04</tt></td>
+      </tr><tr>
+        <td align="center">10-15</td>
         <td align="center"></td>
-        <td align="center">0xFE00</td>
+        <td align="center">0xFC00</td>
 	<td>reserved - leave 0</td>
       </tr><tr>
         <td align="center">16</td>
@@ -269,6 +332,24 @@
         <td align="center">0x10000</td>
         <td>Append extra statistics to the clockstats line.
         Details below.</td>
+       </tr><tr>
+        <td align="center">17</td>
+        <td align="center">131072</td>
+        <td align="center">0x20000</td>
+        <td>"Silent PPS" mode. Use the PPS channel (if enabled with
+          fudge flag 1) to get precise receive time stamps.
+          Do <em>not</em> set the PPS flag in the clock status, so the
+          clock is not considered as PPS peer.
+	</td>
+       </tr><tr>
+        <td align="center">18</td>
+        <td align="center">262144</td>
+        <td align="center">0x40000</td>
+        <td>Trust the date delivered via NMEA. Do this only if
+          you <em>really</em> trust the receiver!
+          See <a href="#datetrust">below</a>. <strong>Caveat:</strong>
+          This (hitherto undocumented) bit has moved!
+	</td>
       </tr>
     </tbody></table> 
 
@@ -291,7 +372,7 @@
       </li></ul>
       The driver uses 4800 bits per second by default, but faster bitrates can
       be selected using bits 4 to 6 of the mode field.
-    <p></p>
+    </p>
 
     <p>
       <strong>Caveat:</strong> Using higher line speeds does not necessarily
@@ -306,6 +387,29 @@
       linespeed of 4800 bps or 9600 bps.
     </p>
 
+    <h4><a name="datetrust"/>About distrusting NMEA date stamps</h4>
+    <p>
+      Trusting the calendar dates delivered via NMEA is a risky thing, and by
+      default these dates are handled with a huge dose of skepticism.  Many
+      receivers deliver a correct calendar date for a period of just 1024 weeks,
+      with a starting point baked somewhere into their firmware.  Beyond that,
+      they warp back to the begin of their era and simply provide wrong date
+      information.  To battle this widely observed effect, the date delivered is
+      by default reduced to GPS time again and then (re-)mapped according to the
+      base date, either the implicit value or the value set via "tos basedate".
+      If the receiver can <em>really</em> be trusted to deliver the right date
+      (which is not impossible, just more expensive for the manufacturer), then
+      mode bit 18 can be used to bypass the era mapping.  Setting this bit is
+      not needed under most circumstances, and setting it with an unreliable
+      receiver can have severe effects. Handle with care.
+    </p><p>
+      <strong>Note:</strong> This functionality was available for some time as
+      undocumented feature, with a different bit value.  It was moved in the
+      process of becoming officially acknowledged to avoid excessive scattering
+      of the mode bit mask.
+    </p>
+    
+    
     <h4>Monitor Data</h4>
 
     <p>The last GPS sentence that is accepted or rejected is written to the
--- contrib/ntp/html/drivers/driver29.html.orig
+++ contrib/ntp/html/drivers/driver29.html
@@ -11,7 +11,7 @@
 	<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
 		<h1><font size="+2">Trimble Palisade and Thunderbolt Receivers</font>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->21-Oct-2010  23:44<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->13-Sep-2019  08:07<!-- #EndDate -->
   UTC</p>
 			<hr>
 		</h1>
@@ -69,13 +69,28 @@
 				</td>
 				<td><b>9600 baud, 8-bits, 1-stop, no parity</b></td>
 			</tr>
+			<tr>
+			        <td>
+					<div align="right">
+						<tt><font size="+1">Serial I/O (Copernicus II):</font></tt></div>
+				</td>
+				<td><b>38400 baud, 8-bits, 1-stop, no parity</b></td>
+			</tr>
 		</table>
 		<h2><font size="+1">Description</font></h2>
 		The <b>refclock_palisade</b> driver supports <a href="http://www.trimble.com/products/ntp">Trimble Navigation's Palisade Smart Antenna GPS receiver</a>.<br>
 		Additional software and information about the Palisade GPS is available from: <a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>.<br>
 		Latest NTP driver source, executables and documentation is maintained at: <a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a>
-		<p>This documentation describes version 7.12 of the GPS Firmware and version 2.46 (July 15, 1999) and later, of the driver source.<br>&nbsp;</p>
+		<p>This documentation describes version 7.12 of the GPS Firmware and version 2.46 (July 15, 1999) and later, of the driver source.</p>
 		<p>This documentation describes version 1 of the Thunderbolt Receiver Firmware, no tests have been made on further firmwares, please read "Notes on the Thunderbolt Receiver's Firmware" at the end of this documentation for more information.</p>
+		<p>This driver also supports the following receivers:</p>
+		<blockquote>
+			<p>Endrun Technologies Praecis NTP server with GPS</p>
+			<p>Trimble Acutime Gold smart antenna</p>
+			<p>Trimble Resolution family</p>
+			<p>Trimble ACE III</p>
+			<p>Trimble Copernicus II</p>
+		</blockquote>
 		<h2><font size="+1">Operating System Compatibility</font></h2>
 		The Palisade driver has been tested on the following software and hardware platforms:<br>&nbsp;
 		<center>
@@ -118,7 +133,7 @@
 				</tr>
 			</table>
 		</center><P>
-		<b>Attention</b>: Thunderbolt Receiver has not being tested on the previous software and hardware plataforms.
+		<b>Attention</b>: Other receiver types have not being tested on the previous software and hardware plataforms.
 		<h2><font size="+1">GPS Receiver</font></h2>
 		The Palisade GPS receiver is an 8-channel smart antenna, housing the GPS receiver, antenna and interface in a single unit, and is designed for rooftop deployment in static timing applications.
 		<p>Palisade generates a PPS synchronized to UTC within +/- 100 ns.&nbsp; The Palisade's external event input with 40 nanosecond resolution is utilized by the Palisade NTP driver for asynchronous precision time transfer.</p>
@@ -232,7 +247,41 @@
 		<tt># and set flag2 to turn off event polling.</tt><br>
 		<tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
 		<tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
-		Currently the Thunderbolt mode doesn't support event polling, the reasons are explained on the "Notes on the Thunderbolt Receiver's Firmware" section at the end of this documentation.
+		
+		<h4>Resolution NTP Configuration file</h4>
+		<tt>#------------------------------------------------------------------------------</tt>
+		<p>Configuration without event polling:<br>
+		<tt>#------------------------------------------------------------------------------</tt><br>
+		<tt># The Primary reference</tt><br>
+		<tt>server 127.127.29.0 mode 5 # Trimble Resolution GPS (Stratum 1).</tt><br>
+		<tt># Set packet delay</tt><br>
+		<tt><a href="#time1">fudge 127.127.29.0 time1 0.410</a></tt><br>
+		<tt># and set flag2 to turn off event polling.</tt><br>
+		<tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
+		<tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
+		
+		<h4>ACE III NTP Configuration file</h4>
+		<tt>#------------------------------------------------------------------------------</tt>
+		<p>Configuration with event polling:<br>
+		<tt>#------------------------------------------------------------------------------</tt><br>
+		<tt># The Primary reference</tt><br>
+		<tt>server 127.127.29.0 mode 6 # Trimble ACE III GPS (Stratum 1).</tt><br>
+		<tt># Set packet delay</tt><br>
+		<tt><a href="#time1">fudge 127.127.29.0 time1 0.720</a></tt><br>
+		<tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
+		
+		<h4>Copernicus II NTP Configuration file</h4>
+		<tt>#------------------------------------------------------------------------------</tt>
+		<p>Configuration without event polling:<br>
+		<tt>#------------------------------------------------------------------------------</tt><br>
+		<tt># The Primary reference</tt><br>
+		<tt>server 127.127.29.0 mode 7 # Trimble Copernicus II GPS (Stratum 1).</tt><br>
+		<tt># Set packet delay</tt><br>
+		<tt><a href="#time1">fudge 127.127.29.0 time1 0.240</a></tt><br>
+		<tt># and set flag2 to turn off event polling.</tt><br>
+		<tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
+		<tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
+		Currently the Thunderbolt mode doesn't support event polling, the reasons are explained on the "Notes on the Thunderbolt Receiver's Firmware" section at the end of this documentation.  The Resolution and Copernicus II modes require event polling to be disabled whereas the ACE III requires polling to be enabled.
 		<h2><a name="TimeTransfer"></a><font size="+1">Time Transfer and Polling</font></h2>
 		Time transfer to the NTP host is performed via the Palisade's comprehensive time packet output. The time packets are output once per second, and whenever an event timestamp is requested.
 		<p>The driver requests an event time stamp at the end of each polling interval, by pulsing the RTS (request to send) line on the serial port. The Palisade GPS responds with a time stamped event packet.</p>
@@ -269,7 +318,16 @@
 		<h2><font size="+1">Mode Parameter</font></h2>
 		<dl>
 			<dt><tt><font size="+1">mode <i>number</i></font></tt>
-			<dd>The mode parameter to the server command specifies the specific hardware this driver is for. The default is 0 for a normal Trimble Palisade. The other options are <b>1</b> for an <b>Endrun Praecis</b> in Trimble emulation mode, and <b>2</b> for the <b>Trimble Thunderbolt</b> GPS Disciplined Clock Receiver.
+			<dd>
+				The mode parameter to the server command specifies the specific hardware this driver is for. The default is 0 for a normal Trimble Palisade. The other options are:
+				<blockquote>
+					<p><b>1</b> for an <b>Endrun Praecis</b> in Trimble emulation mode</p>
+					<p><b>2</b> for the <b>Trimble Thunderbolt</b> GPS Disciplined Clock Receiver</p>
+					<p><b>3</b> for the <b>Acutime Gold</b> smart antenna</p>
+					<p><b>5</b> for <b>Trimble Resolution</b> devices</p>
+					<p><b>6</b> for the <b>Trimble ACE III</b> board</p>
+					<p><b>7</b> for the <b>Trimble Copernicus II</b> device</p>
+				</blockquote>
 		</dl>
 		<h2><font size="+1">DEFINEs</font></h2>
 		The following constants are defined in the driver source code. These defines may be modified to improve performance or adapt to new operating systems.<br>&nbsp;
@@ -291,16 +349,16 @@
 					<td>1 microsecond</td>
 				</tr>
 				<tr>
-					<td>CURRENT_UTC</td>
-					<td>Valid GPS - UTC offset</td>
-					<td>13</td>
-				</tr>
-				<tr>
 					<td>SPEED232</td>
 					<td>Host RS-232 baud rate</td>
 					<td>B9600</td>
 				</tr>
 				<tr>
+					<td>SPEED232COP</td>
+					<td>Host RS-232 baud rate (Copernicus II mode)</td>
+					<td>B38400</td>
+				</tr>
+				<tr>
 					<td>TRMB_MINPOLL&nbsp;</td>
 					<td>Minimum polling interval</td>
 					<td>5 (32 seconds)</td>
--- contrib/ntp/html/miscopt.html.orig
+++ contrib/ntp/html/miscopt.html
@@ -10,7 +10,7 @@
 <img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
 <p>We have three, now looking for more.</p>
 <p>Last update:
-  <!-- #BeginDate format:En2m -->14-Oct-2017  08:34<!-- #EndDate -->
+  <!-- #BeginDate format:En2m -->11-Feb-2020  14:00<!-- #EndDate -->
     UTC</p>
 <br clear="left">
 <h4>Related Links</h4>
@@ -63,8 +63,9 @@
   <dd>This command allows additional configuration commands to be included from a separate file. Include files may be nested to a depth of five; upon reaching the end of any include file, command processing resumes in the previous configuration file. This option is useful for sites that run <tt>ntpd</tt> on multiple hosts, with (mostly) common options (e.g., a restriction list).</dd>
   <dt id="interface"><tt>interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard | <i>name</i> | <i>address</i>[/<i>prefixlen</i>]]</tt></dt>
   <dd>This command controls which network addresses <tt>ntpd</tt> opens, and whether input is dropped without processing. The first parameter determines the action for addresses which match the second parameter. That parameter specifies a class of addresses, or a specific interface name, or an address. In the address case, <tt><i>prefixlen</i></tt> determines how many bits must match for this rule to apply. <tt>ignore</tt> prevents opening matching addresses, <tt>drop</tt> causes <tt>ntpd</tt> to open the address and drop all received packets without examination. Multiple <tt>interface</tt> commands can be used. The last rule which matches a particular address determines the action for it. <tt>interface</tt> commands are disabled if any <a href="ntpd.html#--interface"><tt>-I</tt></a>, <a href="ntpd.html#--interface"><tt>--interface</tt></a>, <a href="ntpd.html#--novirtualips"><tt>-L</tt></a>, or <a href="ntpd.html#--novirtualips"><tt>--novirtualips</tt></a> command-line options are used.  If none of those options are used and no <tt>interface</tt> actions are specified in the configuration file, all available network addresses are opened. The <tt>nic</tt> command is an alias for <tt>interface</tt>.</dd>
-  <dt id="leapfile"><tt>leapfile <i>leapfile</i></tt></dt>
-  <dd>This command loads the IERS leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from the IERS at <a href="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list">https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</a> or <a href="ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list">ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</a>.</dd>
+  <dt id="leapfile"><tt>leapfile <i>leapfile</i> [checkhash|ignorehash]</tt></dt>
+  <dd>This command loads the IERS leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from the IERS at <a href="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list">https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</a> or <a href="ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list">ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</a>.
+  <tt>ignorehash</tt> instructs <tt>ntpd</tt> to ignore the hash signature on the file, <tt>checkhash</tt> (which is the default when omitted) needs  a hash line in the file to be valid. Files without any hash  signature are lodaed in both cases.</dd>
   <dd>The <i>leapfile</i> is scanned when <tt>ntpd</tt> processes the <tt>leapfile</tt> directive or when <tt>ntpd</tt> detects that <i>leapfile</i> has changed.  <tt>ntpd</tt> checks once a day to see if the <i>leapfile</i> has changed.</dd>
   <dd>While not strictly a security function, the Autokey protocol provides means to securely retrieve the current or updated leapsecond values from a server.</dd>
   <dt id="leapsmearinterval"><tt>leapsmearinterval <i>seconds</i></tt></dt>
@@ -108,6 +109,24 @@
       For the ACTS modem driver (type 18), the arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services.
       For the JJY driver (type 40 mode 100 - 180), the argument is one telephone number used to dial the telephone JJY service.
       The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
+  <dt id="pollskewlist"
+  ><tt>pollskewlist</tt> <tt>[</tt><i>poll</i> <i>value</i><tt>
+  | </tt><i>value</i><tt>]</tt> <tt>...</tt> <tt>[default </tt><i>value</i><tt>
+  | </tt><i>value</i><tt>]</tt></dt>
+<dd>Enable skewing of our poll requests to our servers. 
+<i>poll</i>
+is a number between 3 and 17 inclusive, identifying a specific poll interval. 
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half. 
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive. 
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed. 
+With no arguments, internally specified default values are chosen.</dd>
   <dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
   <dd>Reset one or more groups of counters maintained by ntpd and exposed by <tt>ntpq</tt> and <tt>ntpdc</tt>.</dd>
   <dt id="rlimit"><tt>rlimit [memlock <i>Nmegabytes</i> | stacksize <i>N4kPages</i> | filenum <i>Nfiledescriptors</i>]</tt></dt>
@@ -147,12 +166,16 @@
       <dd>Specifies the stepout threshold in seconds. The default without this command is 300 s. Since this option also affects the training and startup intervals, it should not be set less than the default. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
     </dl>
   </dd>
-  <dt id="tos"><tt>tos [basedate <i>date<i> | bcpollbstep <i>poll-gate</i> | beacon <i>beacon</i> | ceiling <i>ceiling</i> | cohort {0 | 1} | floor <i>floor</i> | maxclock <i>maxclock </i>| maxdist <i>maxdist</i> | minclock <i>minclock</i> | mindist <i>mindist </i>| minsane <i>minsane</i> | orphan <i>stratum</i> | orphanwait <em>delay</em>]</tt></dt>
+  <dt id="tos"><tt>tos [basedate <i>date</i> | bcpollbstep <i>poll-gate</i> | beacon <i>beacon</i> | ceiling <i>ceiling</i> | cohort {0 | 1} | floor <i>floor</i> | maxclock <i>maxclock </i>| maxdist <i>maxdist</i> | minclock <i>minclock</i> | mindist <i>mindist </i>| minsane <i>minsane</i> | orphan <i>stratum</i> | orphanwait <em>delay</em>]</tt></dt>
   <dd>This command alters certain system variables used by the the clock selection and clustering algorithms. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. It can be used to select the quality and quantity of peers used to synchronize the system clock and is most useful in dynamic server discovery schemes. The options are as follows:</dd>
   <dd>
     <dl>
       <dt><tt>basedate <i>date</i></tt></dt>
-      <dd>Set NTP era anchor. <tt><i>date</i></tt> is either a date in ISO8601 format (<i>YYYY-MM-DD<i>) or an integer giving the days since 1900-01-01, the start of the NTP epoch. <tt>ntpd</tt> will clamp the system time to an era starting with the begin of this this day (00:00:00Z), covering a range of 2<sup>32</sup> seconds or roughly 136 years. The default is the begin of the UNIX epoch, 1970-01-01.</dd>
+      <dd>Set NTP and GPS era anchor. <tt><i>date</i></tt> is either a date in ISO8601 format (<i>YYYY-MM-DD</i>) or an integer giving the days since 1900-01-01, the start of the NTP epoch. <tt>ntpd</tt> will clamp the system time to an era starting with the begin of this this day (00:00:00Z), covering a range of 2<sup>32</sup> seconds or roughly 136 years. The lowest accepted value is effectively 1970-01-02.<br>
+	    The GPS era base is the next Sunday on or following the base date, but obviously not before 1980-01-06. GPS time stamps are mapped into the 1024 weeks following the GPS base.<br>
+	The default value is derived from the repository or build time stamp, minus 11 days. 1970-01-02 was chosen as lower bound so the <em>local</em> time is always after 1970-01-01,00:00. Some systems get into trouble if this is not the case.<p>
+	<b><u>ATTENTION:</u></b> If the system clock is before the effective (implied or specific) basedate, the system clock will be set to the base date once and immediately when <tt>ntpd</tt> starts. This helps systems that have lost time completely to recover. Though not noticeable under normal conditions, it <em>can</em> happen. Check the logs if starting <tt>ntpd</tt> causes sudden clock moves.	
+      </dd>
       <dt><tt>bcpollbstep <i>poll-gate</i></tt></dt>
       <dd>This option will cause the client to delay believing backward time steps from a broadcast server for <tt>bcpollbstep</tt> poll intervals.  NTP Broadcast networks are expected to be trusted, and if the server's time gets stepped backwards then it's desireable that the clients follow this change as soon as possible.  However, in spite of various protections built-in to the broadcast protocol, it is possible that an attacker could perform a carefully-constructed replay attack and cause clients to erroneously step their clocks backward.  If the risk of a successful broadcast replay attack is greater than the risk of the clients being out of sync in the event that there is a backward step on the broadcast time servers, this option may be used to cause the clients to delay beliveving backward time steps until <i>poll-gate</i> consecutive polls have been received.  The default is 0, which means the client will accept these steps upon receipt.  Any value from 0 to 4 can be specified.</dd>
       <dt><tt>beacon <i>beacon</i></tt></dt>
--- contrib/ntp/include/Makefile.am.orig
+++ contrib/ntp/include/Makefile.am
@@ -25,6 +25,7 @@
 	ntp.h		\
 	ntp_assert.h	\
 	ntp_calendar.h	\
+	ntp_calgps.h	\
 	ntp_cmdargs.h	\
 	ntp_config.h	\
 	ntp_control.h	\
@@ -46,6 +47,7 @@
 	ntp_md5.h	\
 	ntp_net.h	\
 	ntp_proto.h	\
+	ntp_psl.h	\
 	ntp_random.h	\
 	ntp_refclock.h	\
 	ntp_request.h	\
@@ -76,6 +78,7 @@
 	timespecops.h	\
 	timetoa.h	\
 	timevalops.h	\
+	timexsup.h	\
 	trimble.h	\
 	vint64ops.h	\
 	$(NULL)
--- contrib/ntp/include/Makefile.in.orig
+++ contrib/ntp/include/Makefile.in
@@ -511,6 +511,7 @@
 	ntp.h		\
 	ntp_assert.h	\
 	ntp_calendar.h	\
+	ntp_calgps.h	\
 	ntp_cmdargs.h	\
 	ntp_config.h	\
 	ntp_control.h	\
@@ -532,6 +533,7 @@
 	ntp_md5.h	\
 	ntp_net.h	\
 	ntp_proto.h	\
+	ntp_psl.h	\
 	ntp_random.h	\
 	ntp_refclock.h	\
 	ntp_request.h	\
@@ -562,6 +564,7 @@
 	timespecops.h	\
 	timetoa.h	\
 	timevalops.h	\
+	timexsup.h	\
 	trimble.h	\
 	vint64ops.h	\
 	$(NULL)
--- contrib/ntp/include/ntp.h.orig
+++ contrib/ntp/include/ntp.h
@@ -359,6 +359,7 @@
 	l_fp	aorg;		/* origin timestamp */
 	l_fp	borg;		/* alternate origin timestamp */
 	l_fp	bxmt;		/* most recent broadcast transmit timestamp */
+	l_fp	nonce;		/* Value of nonce we sent as the xmt stamp */
 	double	offset;		/* peer clock offset */
 	double	delay;		/* peer roundtrip delay */
 	double	jitter;		/* peer jitter (squares) */
@@ -466,6 +467,7 @@
 # define FLAG_ASSOC	0x8000	/* autokey request */
 #endif /* OPENSSL */
 #define FLAG_TSTAMP_PPS	0x10000	/* PPS source provides absolute timestamp */
+#define FLAG_LOOPNONCE	0x20000	/* Use a nonce for the loopback test */
 
 /*
  * Definitions for the clear() routine.  We use memset() to clear
@@ -841,6 +843,7 @@
 	u_short		rflags;		/* restrict (accesslist) flags */
 	u_short		mflags;		/* match flags */
 	short		ippeerlimit;	/* IP peer limit */
+	int		srvfuzrftpoll;	/* server response: fuzz reftime */
 	u_long		expire;		/* valid until time */
 	union {				/* variant starting here */
 		res_addr4 v4;
@@ -885,13 +888,16 @@
 #define	RES_MSSNTP		0x1000	/* enable MS-SNTP authentication */
 #define	RES_FLAKE		0x2000	/* flakeway - drop 10% */
 #define	RES_NOMRULIST		0x4000	/* mode 6 mrulist denied */
-#define RES_UNUSED		0x8000	/* Unused flag bits */
 
+#define	RES_SRVRSPFUZ		0x8000	/* Server response: fuzz */
+
+#define RES_UNUSED		0x0000	/* Unused flag bits (none left) */
+
 #define	RES_ALLFLAGS		(RES_FLAGS | RES_NOQUERY |	\
 				 RES_NOMODIFY | RES_NOTRAP |	\
 				 RES_LPTRAP | RES_KOD |		\
 				 RES_MSSNTP | RES_FLAKE |	\
-				 RES_NOMRULIST)
+				 RES_NOMRULIST | RES_SRVRSPFUZ )
 
 /*
  * Match flags (mflags)
--- contrib/ntp/include/ntp_calendar.h.orig
+++ contrib/ntp/include/ntp_calendar.h
@@ -19,6 +19,8 @@
 	uint8_t  second;	/* second of minute */
 	uint8_t  weekday;	/* 0..7, 0=Sunday */
 };
+typedef struct calendar TCivilDate;
+typedef struct calendar const TcCivilDate;
 
 /* ISO week calendar date */
 struct isodate {
@@ -29,6 +31,8 @@
 	uint8_t	 minute;	/* minute of hour */
 	uint8_t	 second;	/* second of minute */
 };
+typedef struct isodate TIsoDate;
+typedef struct isodate const TcIsoDate;
 
 /* general split representation */
 typedef struct {
@@ -109,6 +113,7 @@
 extern	const char * const months[12];
 extern	const char * const daynames[7];
 
+extern	char *	 ntpcal_iso8601std(char*, size_t, struct calendar const*);
 extern	void	 caljulian	(uint32_t, struct calendar *);
 extern	uint32_t caltontp	(const struct calendar *);
 
@@ -152,6 +157,13 @@
 ntpcal_daysplit(const vint64 *);
 
 /*
+ * Split a time stamp in seconds into elapsed weeks and elapsed seconds
+ * since start of week.
+ */
+extern ntpcal_split
+ntpcal_weeksplit(const vint64 *);
+
+/*
  * Merge a number of days and a number of seconds into seconds,
  * expressed in 64 bits to avoid overflow.
  */
@@ -158,6 +170,13 @@
 extern vint64
 ntpcal_dayjoin(int32_t /* days */, int32_t /* seconds */);
 
+/*
+ * Merge a number of weeks and a number of seconds into seconds,
+ * expressed in 64 bits to avoid overflow.
+ */
+extern vint64
+ntpcal_weekjoin(int32_t /* weeks */, int32_t /* seconds */);
+
 /* Get the number of leap years since epoch for the number of elapsed
  * full years
  */
@@ -431,7 +450,7 @@
 /*
  * Start day of the GPS epoch. This is the Rata Die of 1980-01-06
  */
-#define DAY_GPS_STARTS 722819
+#define DAY_GPS_STARTS 722820
 
 /*
  * Difference between UN*X and NTP epoch (25567).
@@ -467,6 +486,56 @@
  */
 #define	GREGORIAN_CYCLE_WEEKS (GREGORIAN_CYCLE_DAYS / 7)
 
-#define	is_leapyear(y)	(!((y) % 4) && !(!((y) % 100) && (y) % 400))
+/*
+ * Is a Greogorian calendar year a leap year? The obvious solution is to
+ * test the expression
+ *
+ * (y % 4 == 0) && ((y % 100 != 0) || (y % 400 == 0))
+ *
+ * This needs (in theory) 2 true divisions -- most compilers check the
+ * (mod 4) condition by doing a bit test. Some compilers have been
+ * even observed to partially fuse the (mod 100) and (mod 400) test,
+ * but there is an alternative formula that gives the compiler even
+ * better chances:
+ *
+ * (y % 4 == 0) && ((y % 16 == 0) || (y % 25 != 0))
+ *
+ * The order of checks is chosen so that the shorcut evaluation can fix
+ * the result as soon as possible. And the compiler has to do only one
+ * true division here -- the (mod 4) and (mod 16) can be done with
+ * direct bit tests. *If* the compiler chooses to do so.
+ *
+ * The deduction is as follows: rewrite the standard formula as
+ *  (y % 4 == 0) && ((y % 4*25 != 0) || (y % 16*25 == 0))
+ *
+ * then split the congruences:
+ *  (y % 4 == 0) && ((y % 4 != 0 || y % 25 != 0) || (y % 16 == 0 && y % 25 == 0))
+ *
+ * eliminate the 1st inner term, as it is provably false:
+ *  (y % 4 == 0) && (y % 25 != 0 || (y % 16 == 0 && y % 25 == 0))
+ *
+ * Use the distributive laws on the second major group:
+ *  (y % 4 == 0) && ((y % 25 != 0 || y % 16 == 0) && (y % 25 != 0 || y % 25 == 0))
+ *
+ * Eliminate the constant term, reorder, and voila: 
+ */
 
+static inline int
+is_leapyear(int32_t y) {
+	return !(y % 4) && (!(y % 16) || (y % 25));
+}
+/* The (mod 4) test eliminates 3/4 (or 12/16) of all values.
+ * The (mod 16) test eliminates another 1/16 of all values.
+ * 3/16 of all values reach the final division.
+ * Assuming that the true division is the most costly operation, this
+ * sequence should give most bang for the buck.
+ */
+
+/* misc */
+extern int      u32mod7(uint32_t x);
+extern int      i32mod7(int32_t x);
+extern uint32_t i32fmod(int32_t x, uint32_t d);
+
+extern int32_t ntpcal_expand_century(uint32_t y, uint32_t m, uint32_t d, uint32_t wd);
+
 #endif
--- contrib/ntp/include/ntp_calgps.h.orig
+++ contrib/ntp/include/ntp_calgps.h
@@ -0,0 +1,151 @@
+/*
+ * ntp_calgps.h - calendar for GPS/GNSS based clocks
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * --------------------------------------------------------------------
+ *
+ * This module implements stuff often used with GPS/GNSS receivers
+ */
+#ifndef NTP_CALGPS_H
+#define NTP_CALGPS_H
+
+#include <time.h>
+
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "ntp_calendar.h"
+
+/* GPS week calendar (extended weeks)
+ * We use weeks based on 1899-31-12, which was the last Sunday before
+ * the begin of the NTP epoch. (Which is equivalent to saying 1900-01-01
+ * was a Monday...)
+ *
+ * We simply pre-calculate the offsets and cycle shifts for the real GPS
+ * calendar, which starts at 1980-01-06, to simplyfy some expressions.
+ *
+ * This has a fringe benefit that should not be overlooked: Since week zero
+ * is around 1900, and we should never have to deal with dates before
+ * 1970 or 1980, a week number of zero can be easily used to indicate
+ * an invalid week time stamp.
+ */
+#define GPSNTP_WSHIFT	4175	/* weeks 1899-31-12 --> 1980-01-06 */
+#define GPSNTP_WCYCLE	  79	/* above, modulo 1024 */
+#define GPSNTP_DSHIFT	   1	/* day number of 1900-01-01 in week */
+
+struct gpsdatum {
+	uint32_t weeks;		/* weeks since GPS epoch	*/
+	int32_t  wsecs;		/* seconds since week start	*/
+	uint32_t frac;		/* fractional seconds		*/
+};
+typedef struct gpsdatum TGpsDatum;
+typedef struct gpsdatum const TcGpsDatum;
+
+/* NTP date/time in split representation */
+struct ntpdatum {
+	uint32_t days;		/* since NTP epoch		*/
+	int32_t  secs;		/* since midnight, denorm is ok */
+	uint32_t frac;		/* fractional seconds		*/
+};
+typedef struct ntpdatum TNtpDatum;
+typedef struct ntpdatum const TcNtpDatum;
+
+/*
+ * GPS week/sec calendar functions
+ *
+ * see the implementation for details, especially the
+ * 'gpscal_from_weektime{1,2}()'
+ */
+
+extern TGpsDatum
+gpscal_fix_gps_era(TcGpsDatum *);
+
+extern void
+gpscal_add_offset(TGpsDatum *datum, l_fp offset);
+
+extern TGpsDatum
+gpscal_from_calendar_ex(TcCivilDate*, l_fp fofs, int/*BOOL*/ warp);
+
+static inline TGpsDatum
+gpscal_from_calendar(TcCivilDate *pCiv, l_fp fofs) {
+    return gpscal_from_calendar_ex(pCiv, fofs, TRUE);
+}
+
+extern TGpsDatum 	/* see source for semantic of the 'fofs' value! */
+gpscal_from_gpsweek(uint16_t w, int32_t s, l_fp fofs);
+
+extern TGpsDatum
+gpscal_from_weektime1(int32_t wsecs, l_fp fofs, l_fp pivot);
+
+extern TGpsDatum
+gpscal_from_weektime2(int32_t wsecs, l_fp fofs,	TcGpsDatum *pivot);
+
+extern void
+gpscal_to_calendar(TCivilDate*, TcGpsDatum*);
+
+extern TGpsDatum
+gpscal_from_gpsntp(TcNtpDatum*);
+
+extern l_fp
+ntpfp_from_gpsdatum(TcGpsDatum *);
+
+/*
+ * NTP day/sec calendar functions
+ *
+ * see the implementation for details, especially the
+ * 'gpscal_from_daytime{1,2}()'
+ */
+extern TNtpDatum
+gpsntp_fix_gps_era(TcNtpDatum *);
+
+extern void
+gpsntp_add_offset(TNtpDatum *datum, l_fp offset);
+
+extern TNtpDatum
+gpsntp_from_calendar_ex(TcCivilDate*, l_fp fofs, int/*BOOL*/ warp);
+
+static inline TNtpDatum
+gpsntp_from_calendar(TcCivilDate * pCiv, l_fp fofs) {
+	return gpsntp_from_calendar_ex(pCiv, fofs, TRUE);
+}
+
+extern TNtpDatum
+gpsntp_from_daytime1_ex(TcCivilDate *dt, l_fp fofs, l_fp pivot, int/*BOOL*/ warp);
+
+static inline TNtpDatum
+gpsntp_from_daytime1(TcCivilDate *dt, l_fp fofs, l_fp pivot) {
+	return gpsntp_from_daytime1_ex(dt, fofs, pivot, TRUE);
+}
+
+extern TNtpDatum
+gpsntp_from_daytime2_ex(TcCivilDate *dt, l_fp fofs, TcNtpDatum *pivot, int/*BOOL*/ warp);
+
+static inline TNtpDatum
+gpsntp_from_daytime2(TcCivilDate *dt, l_fp fofs, TcNtpDatum *pivot) {
+	return gpsntp_from_daytime2_ex(dt, fofs, pivot, TRUE);
+}
+
+extern TNtpDatum
+gpsntp_from_gpscal_ex(TcGpsDatum*, int/*BOOL*/ warp);
+
+static inline TNtpDatum
+gpsntp_from_gpscal(TcGpsDatum *wd) {
+	return gpsntp_from_gpscal_ex(wd, FALSE);
+}
+
+extern void
+gpsntp_to_calendar(TCivilDate*, TcNtpDatum*);
+
+extern l_fp
+ntpfp_from_ntpdatum(TcNtpDatum*);
+
+/*
+ * Some helpers
+ */
+
+/* apply fudge to time stamp: *SUBTRACT* the given offset from an l_fp*/
+extern l_fp
+ntpfp_with_fudge(l_fp lfp, double ofs);
+
+#endif /*!defined(NTP_CALGPS_H)*/
--- contrib/ntp/include/ntp_config.h.orig
+++ contrib/ntp/include/ntp_config.h
@@ -6,6 +6,7 @@
 #endif /* HAVE_SYS_RESOURCE_H */
 
 #include "ntp_machine.h"
+#include "ntp_psl.h"
 #include "ntpsim.h"
 
 
@@ -68,12 +69,13 @@
 	attr_val *	link;
 	int		attr;
 	int		type;	/* T_String, T_Integer, ... */
+	int		flag;	/* auxiliary flags */
 	union val {
-		int		i;
-		u_int		u;
-		int_range	r;
-		double		d;
-		char *		s;
+		double		d;	/* T_Double */
+		int		i;	/* T_Integer */
+		int_range	r;	/* T_Intrange */
+		char *		s;	/* T_String */
+		u_int		u;	/* T_U_int */
 	} value;
 };
 
@@ -110,9 +112,10 @@
 	restrict_node *	link;
 	address_node *	addr;
 	address_node *	mask;
-	int_fifo *	flag_tok_fifo;
+	attr_val_fifo *	flag_tok_fifo;
 	int		line_no;
 	short		ippeerlimit;
+	short		srvfuzrft;
 };
 
 typedef DECL_FIFO_ANCHOR(restrict_node) restrict_fifo;
@@ -246,6 +249,7 @@
 	attr_val_fifo *	vars;
 	nic_rule_fifo *	nic_rules;
 	int_fifo *	reset_counters;
+	attr_val_fifo *	pollskewlist;
 
 	sim_fifo *	sim_details;
 	int		mdnstries;
@@ -272,6 +276,23 @@
 } settrap_parms;
 
 
+/*
+ * Poll Skew List
+ */
+
+psl_item psl[17-3+1];		/* values for polls 3-17 */
+				/* To simplify the runtime code we */
+				/* don't want to have to special-case */
+				/* dealing with a default */
+
+
+/*
+** Data Minimization Items
+*/
+
+/* Serverresponse fuzz reftime: stored in 'restrict' fifos */
+
+
 /* get text from T_ tokens */
 const char * token_name(int token);
 
@@ -298,9 +319,9 @@
 void destroy_address_node(address_node *my_node);
 attr_val *create_attr_dval(int attr, double value);
 attr_val *create_attr_ival(int attr, int value);
+attr_val *create_attr_rval(int attr, int first, int last);
+attr_val *create_attr_sval(int attr, const char *s);
 attr_val *create_attr_uval(int attr, u_int value);
-attr_val *create_attr_rangeval(int attr, int first, int last);
-attr_val *create_attr_sval(int attr, const char *s);
 void	  destroy_attr_val(attr_val *node);
 filegen_node *create_filegen_node(int filegen_token,
 				  attr_val_fifo *options);
@@ -308,7 +329,7 @@
 restrict_node *create_restrict_node(address_node *addr,
 				    address_node *mask,
 				    short ippeerlimit,
-				    int_fifo *flags, int line_no);
+				    attr_val_fifo *flags, int line_no);
 int_node *create_int_node(int val);
 addr_opts_node *create_addr_opts_node(address_node *addr,
 				      attr_val_fifo *options);
--- contrib/ntp/include/ntp_control.h.orig
+++ contrib/ntp/include/ntp_control.h
@@ -1,3 +1,5 @@
+#ifndef NTP_CONTROL_H
+#define NTP_CONTROL_H
 /*
  * ntp_control.h - definitions related to NTP mode 6 control messages
  */
@@ -190,3 +192,5 @@
 #define	IFSTATS_FIELDS	12
 #define	RESLIST_FIELDS	4
 
+#endif /* NTP_CONTROL_H */
+
--- contrib/ntp/include/ntp_fp.h.orig
+++ contrib/ntp/include/ntp_fp.h
@@ -344,8 +344,8 @@
 /*
  * Prototypes
  */
-extern	char *	dofptoa		(u_fp, int, short, int);
-extern	char *	dolfptoa	(u_int32, u_int32, int, short, int);
+extern	char *	dofptoa		(u_fp, char, short, int);
+extern	char *	dolfptoa	(u_int32, u_int32, char, short, int);
 
 extern	int	atolfp		(const char *, l_fp *);
 extern	int	buftvtots	(const char *, l_fp *);
--- contrib/ntp/include/ntp_io.h.orig
+++ contrib/ntp/include/ntp_io.h
@@ -84,7 +84,7 @@
 
 extern int	qos;
 SOCKET		move_fd(SOCKET fd);
-isc_boolean_t	get_broadcastclient_flag(void);
+/*isc_boolean_t	get_broadcastclient_flag(void);*/
 extern void	sau_from_netaddr(sockaddr_u *, const isc_netaddr_t *);
 extern void	add_nic_rule(nic_rule_match match_type,
 			     const char *if_name, int prefixlen,
--- contrib/ntp/include/ntp_psl.h.orig
+++ contrib/ntp/include/ntp_psl.h
@@ -0,0 +1,17 @@
+#ifndef NTP_PSL_H
+#define NTP_PSL_H
+
+
+/*
+ * Poll Skew List Item
+ */
+
+typedef struct psl_item_tag {
+	int		sub;	/* int or short?  unsigned is OK, but why? */
+	int		qty;	/* int or short?  unsigned is OK, but why? */
+	int		msk;	/* int or short?  unsigned is OK */
+} psl_item;
+
+int get_pollskew(int, psl_item *);
+
+#endif	/* !defined(NTP_PSL_H) */
--- contrib/ntp/include/ntp_refclock.h.orig
+++ contrib/ntp/include/ntp_refclock.h
@@ -14,11 +14,6 @@
 #include "recvbuff.h"
 
 
-#define SAMPLE(x)	pp->coderecv = (pp->coderecv + 1) % MAXSTAGE; \
-			pp->filter[pp->coderecv] = (x); \
-			if (pp->coderecv == pp->codeproc) \
-				pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
-
 /*
  * Macros to determine the clock type and unit numbers from a
  * 127.127.t.u address
@@ -54,6 +49,7 @@
 #define	CLK_HAVEFLAG2	0x20
 #define	CLK_HAVEFLAG3	0x40
 #define	CLK_HAVEFLAG4	0x80
+#define	CLK_HAVEMINJIT	0x100
 
 /*
  * Constant for disabling event reporting in
@@ -68,7 +64,7 @@
 struct refclockstat {
 	u_char	type;		/* clock type */
 	u_char	flags;		/* clock flags */
-	u_char	haveflags;	/* bit array of valid flags */
+	u_short	haveflags;	/* bit array of valid flags */
 	u_short	lencode;	/* length of last timecode */
 	const char *p_lastcode;	/* last timecode received */
 	u_int32	polls;		/* transmit polls */
@@ -77,6 +73,7 @@
 	u_int32	baddata;	/* invalid data timecode received */
 	u_int32	timereset;	/* driver resets */
 	const char *clockdesc;	/* ASCII description */
+	double	fudgeminjitter;	/* configure fudge minjitter */
 	double	fudgetime1;	/* configure fudge time1 */
 	double	fudgetime2;	/* configure fudge time2 */
 	int32	fudgeval1;	/* configure fudge value1 */
@@ -133,13 +130,12 @@
  * Structure interface between the reference clock support
  * ntp_refclock.c and the driver utility routines
  */
-#define MAXSTAGE	60	/* max median filter stages  */
+#define MAXSTAGE	64	/* max median filter stages  */
 #define NSTAGE		5	/* default median filter stages */
 #define BMAX		128	/* max timecode length */
 #define GMT		0	/* I hope nobody sees this */
 #define MAXDIAL		60	/* max length of modem dial strings */
 
-
 struct refclockproc {
 	void *	unitptr;	/* pointer to unit structure */
 	struct refclock * conf;	/* refclock_conf[type] */
@@ -148,6 +144,7 @@
 	u_char	currentstatus;	/* clock status */
 	u_char	lastevent;	/* last exception event */
 	u_char	type;		/* clock type */
+	u_char	inpoll;		/* waiting for 'refclock_receive()' */
 	const char *clockdesc;	/* clock description */
 	u_long	nextaction;	/* local activity timeout */
 	void	(*action)(struct peer *); /* timeout callback */
@@ -162,8 +159,8 @@
 	int	second;		/* second of minute */
 	long	nsec;		/* nanosecond of second */
 	u_long	yearstart;	/* beginning of year */
-	int	coderecv;	/* put pointer */
-	int	codeproc;	/* get pointer */
+	u_int	coderecv;	/* put pointer */
+	u_int	codeproc;	/* get pointer */
 	l_fp	lastref;	/* reference timestamp */
 	l_fp	lastrec;	/* receive timestamp */
 	double	offset;		/* mean offset */
@@ -176,6 +173,7 @@
 	 */
 	double	fudgetime1;	/* fudge time1 */
 	double	fudgetime2;	/* fudge time2 */
+	double	fudgeminjitter;	/* manually set lower bound for jitter */
 	u_char	stratum;	/* server stratum */
 	u_int32	refid;		/* reference identifier */
 	u_char	sloppyclockflag; /* fudge flags */
@@ -229,6 +227,8 @@
 extern 	int	refclock_process_f(struct refclockproc *, double);
 extern 	void	refclock_process_offset(struct refclockproc *, l_fp,
 					l_fp, double);
+extern	int	refclock_samples_avail(struct refclockproc const *);
+extern	int	refclock_samples_expire(struct refclockproc *, int);
 extern	void	refclock_report	(struct peer *, int);
 extern	int	refclock_gtlin	(struct recvbuf *, char *, int, l_fp *);
 extern	int	refclock_gtraw	(struct recvbuf *, char *, int, l_fp *);
@@ -235,6 +235,21 @@
 extern	int	indicate_refclock_packet(struct refclockio *,
 					 struct recvbuf *);
 extern	void	process_refclock_packet(struct recvbuf *);
+
+/* save string as la_code, size==(size_t)-1 ==> ASCIIZ string */ 
+extern	void	refclock_save_lcode(
+			struct refclockproc *, char const *, size_t);
+/* format data into la_code */
+extern	void	refclock_format_lcode(
+			struct refclockproc *, char const *, ...);
+extern	void	refclock_vformat_lcode(
+			struct refclockproc *, char const *, va_list);
+				       
+struct refclock_atom;
+extern int	refclock_ppsaugment(
+    const struct refclock_atom*, l_fp *rcvtime ,
+    double rcvfudge, double ppsfudge);
+
 #endif /* REFCLOCK */
 
 #endif /* NTP_REFCLOCK_H */
--- contrib/ntp/include/ntp_request.h.orig
+++ contrib/ntp/include/ntp_request.h
@@ -670,8 +670,10 @@
 	u_int32	addr;		/* match address */
 	u_int32 mask;		/* match mask */
 	short ippeerlimit;	/* ip peer limit */
-	u_short flags;		/* restrict flags */
+	int srvfuzrft;		/* server response fuzz reftime: poll */
+	u_short flags;		/* restrict flags XXX: OLD size and name */
 	u_short mflags;		/* match flags */
+	short unused1;		/* (unused) padding for v6_flag */
 	u_int v6_flag;		/* is this v6 or not */
 	struct in6_addr addr6; 	/* match address (v6) */
 	struct in6_addr mask6; 	/* match mask (v6) */
--- contrib/ntp/include/ntp_stdlib.h.orig
+++ contrib/ntp/include/ntp_stdlib.h
@@ -159,7 +159,7 @@
 extern	const char * eventstr	(int);
 extern	const char * ceventstr	(int);
 extern	const char * res_match_flags(u_short);
-extern	const char * res_access_flags(u_short);
+extern	const char * res_access_flags(u_int32);
 #ifdef KERNEL_PLL
 extern	const char * k_st_flags	(u_int32);
 #endif
--- contrib/ntp/include/ntp_syslog.h.orig
+++ contrib/ntp/include/ntp_syslog.h
@@ -83,4 +83,7 @@
 		msyslog msl_args;				\
 } while (FALSE)
 
+extern int change_iobufs(int how);
+/* how: 0->unbuffered, 1->linebuffer, 2->full */
+
 #endif /* NTP_SYSLOG_H */
--- contrib/ntp/include/ntpd.h.orig
+++ contrib/ntp/include/ntpd.h
@@ -232,7 +232,7 @@
 extern	double	sys_maxdist;
 
 extern	char	*sys_ident;	/* identity scheme */
-extern	void	poll_update	(struct peer *, u_char);
+extern	void	poll_update	(struct peer *, u_char, u_char);
 
 extern	void	clear		(struct peer *);
 extern	void	clock_filter	(struct peer *, double, double, double);
@@ -282,7 +282,7 @@
 /* ntp_util.c */
 extern	void	init_util	(void);
 extern	void	write_stats	(void);
-extern	void	stats_config	(int, const char *);
+extern	void	stats_config	(int, const char *, int optflag);
 extern	void	record_peer_stats (sockaddr_u *, int, double, double, double, double);
 extern	void	record_proto_stats (char *);
 extern	void	record_loop_stats (double, double, double, double, int);
@@ -568,7 +568,7 @@
 extern const char *chrootdir;	/* directory to chroot() to */
 #endif
 #ifdef HAVE_WORKING_FORK
-extern	int	waitsync_fd_to_close;	/* -w/--wait-sync */
+extern	int	daemon_pipe[2];	/* startup monitoring */
 #endif
 
 /* ntservice.c */
--- contrib/ntp/include/timespecops.h.orig
+++ contrib/ntp/include/timespecops.h
@@ -56,69 +56,12 @@
 /* predicate: returns TRUE if the nanoseconds are out-of-bounds */
 #define timespec_isdenormal(x)	(!timespec_isnormal(x))
 
-/* conversion between l_fp fractions and nanoseconds */
-#ifdef HAVE_U_INT64
-# define FTOTVN(tsf)						\
-	((int32)						\
-	 (((u_int64)(tsf) * NANOSECONDS + 0x80000000) >> 32))
-# define TVNTOF(tvu)						\
-	((u_int32)						\
-	 ((((u_int64)(tvu) << 32) + NANOSECONDS / 2) /		\
-	  NANOSECONDS))
-#else
-# define NSECFRAC	(FRAC / NANOSECONDS)
-# define FTOTVN(tsf)						\
-	((int32)((tsf) / NSECFRAC + 0.5))
-# define TVNTOF(tvu)						\
-	((u_int32)((tvu) * NSECFRAC + 0.5))
-#endif
 
 
 
 /* make sure nanoseconds are in nominal range */
-static inline struct timespec
-normalize_tspec(
-	struct timespec x
-	)
-{
-#if SIZEOF_LONG > 4
-	long	z;
+extern struct timespec normalize_tspec(struct timespec x);
 
-	/* 
-	 * tv_nsec is of type 'long', and on a 64-bit machine using only
-	 * loops becomes prohibitive once the upper 32 bits get
-	 * involved. On the other hand, division by constant should be
-	 * fast enough; so we do a division of the nanoseconds in that
-	 * case. The floor adjustment step follows with the standard
-	 * normalisation loops. And labs() is intentionally not used
-	 * here: it has implementation-defined behaviour when applied
-	 * to LONG_MIN.
-	 */
-	if (x.tv_nsec < -3l * NANOSECONDS ||
-	    x.tv_nsec > 3l * NANOSECONDS) {
-		z = x.tv_nsec / NANOSECONDS;
-		x.tv_nsec -= z * NANOSECONDS;
-		x.tv_sec += z;
-	}
-#endif
-	/* since 10**9 is close to 2**32, we don't divide but do a
-	 * normalisation in a loop; this takes 3 steps max, and should
-	 * outperform a division even if the mul-by-inverse trick is
-	 * employed. */
-	if (x.tv_nsec < 0)
-		do {
-			x.tv_nsec += NANOSECONDS;
-			x.tv_sec--;
-		} while (x.tv_nsec < 0);
-	else if (x.tv_nsec >= NANOSECONDS)
-		do {
-			x.tv_nsec -= NANOSECONDS;
-			x.tv_sec++;
-		} while (x.tv_nsec >= NANOSECONDS);
-
-	return x;
-}
-
 /* x = a + b */
 static inline struct timespec
 add_tspec(
@@ -196,46 +139,14 @@
 }
 
 /* x = abs(a) */
-static inline struct timespec
-abs_tspec(
-	struct timespec	a
-	)
-{
-	struct timespec	c;
+struct timespec abs_tspec(struct timespec a);
 
-	c = normalize_tspec(a);
-	if (c.tv_sec < 0) {
-		if (c.tv_nsec != 0) {
-			c.tv_sec = -c.tv_sec - 1;
-			c.tv_nsec = NANOSECONDS - c.tv_nsec;
-		} else {
-			c.tv_sec = -c.tv_sec;
-		}
-	}
-
-	return c;
-}
-
 /*
  * compare previously-normalised a and b
  * return 1 / 0 / -1 if a < / == / > b
  */
-static inline int
-cmp_tspec(
-	struct timespec a,
-	struct timespec b
-	)
-{
-	int r;
+extern int cmp_tspec(struct timespec a,	struct timespec b);
 
-	r = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec);
-	if (0 == r)
-		r = (a.tv_nsec > b.tv_nsec) -
-		    (a.tv_nsec < b.tv_nsec);
-	
-	return r;
-}
-
 /*
  * compare possibly-denormal a and b
  * return 1 / 0 / -1 if a < / == / > b
@@ -253,20 +164,8 @@
  * test previously-normalised a
  * return 1 / 0 / -1 if a < / == / > 0
  */
-static inline int
-test_tspec(
-	struct timespec	a
-	)
-{
-	int		r;
+extern int test_tspec(struct timespec a);
 
-	r = (a.tv_sec > 0) - (a.tv_sec < 0);
-	if (r == 0)
-		r = (a.tv_nsec > 0);
-	
-	return r;
-}
-
 /*
  * test possibly-denormal a
  * return 1 / 0 / -1 if a < / == / > 0
@@ -293,21 +192,8 @@
  */
 
 /* convert from timespec duration to l_fp duration */
-static inline l_fp
-tspec_intv_to_lfp(
-	struct timespec	x
-	)
-{
-	struct timespec	v;
-	l_fp		y;
-	
-	v = normalize_tspec(x);
-	y.l_uf = TVNTOF(v.tv_nsec);
-	y.l_i = (int32)v.tv_sec;
+extern l_fp tspec_intv_to_lfp(struct timespec x);
 
-	return y;
-}
-
 /* x must be UN*X epoch, output will be in NTP epoch */
 static inline l_fp
 tspec_stamp_to_lfp(
@@ -323,71 +209,14 @@
 }
 
 /* convert from l_fp type, relative signed/unsigned and absolute */
-static inline struct timespec
-lfp_intv_to_tspec(
-	l_fp		x
-	)
-{
-	struct timespec out;
-	l_fp		absx;
-	int		neg;
-	
-	neg = L_ISNEG(&x);
-	absx = x;
-	if (neg) {
-		L_NEG(&absx);	
-	}
-	out.tv_nsec = FTOTVN(absx.l_uf);
-	out.tv_sec = absx.l_i;
-	if (neg) {
-		out.tv_sec = -out.tv_sec;
-		out.tv_nsec = -out.tv_nsec;
-		out = normalize_tspec(out);
-	}
+extern struct timespec lfp_intv_to_tspec(l_fp x);
+extern struct timespec lfp_uintv_to_tspec(l_fp x);
 
-	return out;
-}
-
-static inline struct timespec
-lfp_uintv_to_tspec(
-	l_fp		x
-	)
-{
-	struct timespec	out;
-	
-	out.tv_nsec = FTOTVN(x.l_uf);
-	out.tv_sec = x.l_ui;
-
-	return out;
-}
-
 /*
  * absolute (timestamp) conversion. Input is time in NTP epoch, output
  * is in UN*X epoch. The NTP time stamp will be expanded around the
  * pivot time *p or the current time, if p is NULL.
  */
-static inline struct timespec
-lfp_stamp_to_tspec(
-	l_fp		x,
-	const time_t *	p
-	)
-{
-	struct timespec	out;
-	vint64		sec;
+extern struct timespec lfp_stamp_to_tspec(l_fp x, const time_t *pivot);
 
-	sec = ntpcal_ntp_to_time(x.l_ui, p);
-	out.tv_nsec = FTOTVN(x.l_uf);
-
-	/* copying a vint64 to a time_t needs some care... */
-#if SIZEOF_TIME_T <= 4
-	out.tv_sec = (time_t)sec.d_s.lo;
-#elif defined(HAVE_INT64)
-	out.tv_sec = (time_t)sec.q_s;
-#else
-	out.tv_sec = ((time_t)sec.d_s.hi << 32) | sec.d_s.lo;
-#endif
-	
-	return out;
-}
-
 #endif	/* TIMESPECOPS_H */
--- contrib/ntp/include/timexsup.h.orig
+++ contrib/ntp/include/timexsup.h
@@ -0,0 +1,42 @@
+/*
+ * timexsup.h - 'struct timex' support functions
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ */
+#ifndef TIMEXSUP_H
+#define TIMEXSUP_H
+
+
+/* convert a 'long' time value (in usec or nsec) into seconds, expressed
+ * as a 'double'. If 'STA_NANO' is not defined, this will always convert
+ * from usec. ('STA_NANO' is Linux specific at the time of this
+ * writing.)
+ *
+ * If 'STA_NANO' is defined, it will be checked in 'status' to decide
+ * which time base (usec or nsec) applies for this conversion.
+ */
+extern double dbl_from_var_long(long lval, int status);
+
+/* convert a 'long' time value in usec into seconds, expressed as
+ * 'double'.  This function is there for pure symmetry right now -- it
+ * just casts and scales without any additional bells and whistles.
+ */ 
+extern double dbl_from_usec_long(long lval);
+
+/* If MOD_NANO is defined, set the MOD_NANO bit in '*modes' and
+ * calculate the time stamp in nsec; otherwise, calculate the result in
+ * usec.
+ *
+ * Applies proper bounds checks and saturation on LONG_MAX/LONG_MIN to
+ * avoid undefined behaviour.
+ */
+extern long var_long_from_dbl(double dval, unsigned int *modes);
+
+/* convert a 'double' time value (in seconds) into usec with proper
+ * bounds check and range clamp.
+ */
+extern long usec_long_from_dbl(double dval);
+
+#endif
+/* -*- that's all folks -*- */
--- contrib/ntp/libntp/Makefile.am.orig
+++ contrib/ntp/libntp/Makefile.am
@@ -81,6 +81,7 @@
 	msyslog.c					\
 	netof.c						\
 	ntp_calendar.c					\
+	ntp_calgps.c					\
 	ntp_crypto_rnd.c				\
 	ntp_intres.c					\
 	ntp_libopts.c					\
@@ -104,8 +105,10 @@
 	strdup.c					\
 	strl_obsd.c					\
 	syssignal.c					\
+	timespecops.c					\
 	timetoa.c					\
 	timevalops.c					\
+	timexsup.c					\
 	uglydate.c					\
 	vint64ops.c					\
 	work_fork.c					\
--- contrib/ntp/libntp/Makefile.in.orig
+++ contrib/ntp/libntp/Makefile.in
@@ -154,13 +154,14 @@
 	hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
 	is_ip_address.c lib_strbuf.c libssl_compat.c machines.c \
 	mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
-	ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c ntp_lineedit.c \
-	ntp_random.c ntp_rfc2553.c ntp_worker.c numtoa.c numtohost.c \
-	octtoint.c prettydate.c refidsmear.c recvbuff.c refnumtoa.c \
-	snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
-	statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
-	timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
-	xsbprintf.c ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
+	ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
+	ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_worker.c \
+	numtoa.c numtohost.c octtoint.c prettydate.c refidsmear.c \
+	recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+	socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+	syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
+	uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
+	ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
 	$(srcdir)/../lib/isc/buffer.c \
 	$(srcdir)/../lib/isc/backtrace-emptytbl.c \
 	$(srcdir)/../lib/isc/backtrace.c \
@@ -213,7 +214,7 @@
 	is_ip_address.$(OBJEXT) lib_strbuf.$(OBJEXT) \
 	libssl_compat.$(OBJEXT) machines.$(OBJEXT) mktime.$(OBJEXT) \
 	modetoa.$(OBJEXT) mstolfp.$(OBJEXT) msyslog.$(OBJEXT) \
-	netof.$(OBJEXT) ntp_calendar.$(OBJEXT) \
+	netof.$(OBJEXT) ntp_calendar.$(OBJEXT) ntp_calgps.$(OBJEXT) \
 	ntp_crypto_rnd.$(OBJEXT) ntp_intres.$(OBJEXT) \
 	ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \
 	ntp_random.$(OBJEXT) ntp_rfc2553.$(OBJEXT) \
@@ -222,10 +223,11 @@
 	recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) \
 	socket.$(OBJEXT) socktoa.$(OBJEXT) socktohost.$(OBJEXT) \
 	ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \
-	strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timetoa.$(OBJEXT) \
-	timevalops.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \
-	work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \
-	ymd2yd.$(OBJEXT) $(am__objects_3) $(am__objects_1)
+	strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timespecops.$(OBJEXT) \
+	timetoa.$(OBJEXT) timevalops.$(OBJEXT) timexsup.$(OBJEXT) \
+	uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \
+	work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) ymd2yd.$(OBJEXT) \
+	$(am__objects_3) $(am__objects_1)
 am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
 libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
 libntpsim_a_AR = $(AR) $(ARFLAGS)
@@ -238,13 +240,14 @@
 	hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
 	is_ip_address.c lib_strbuf.c libssl_compat.c machines.c \
 	mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
-	ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c ntp_lineedit.c \
-	ntp_random.c ntp_rfc2553.c ntp_worker.c numtoa.c numtohost.c \
-	octtoint.c prettydate.c refidsmear.c recvbuff.c refnumtoa.c \
-	snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
-	statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
-	timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
-	xsbprintf.c ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
+	ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
+	ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_worker.c \
+	numtoa.c numtohost.c octtoint.c prettydate.c refidsmear.c \
+	recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+	socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+	syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
+	uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
+	ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
 	$(srcdir)/../lib/isc/buffer.c \
 	$(srcdir)/../lib/isc/backtrace-emptytbl.c \
 	$(srcdir)/../lib/isc/backtrace.c \
@@ -675,6 +678,7 @@
 	msyslog.c					\
 	netof.c						\
 	ntp_calendar.c					\
+	ntp_calgps.c					\
 	ntp_crypto_rnd.c				\
 	ntp_intres.c					\
 	ntp_libopts.c					\
@@ -698,8 +702,10 @@
 	strdup.c					\
 	strl_obsd.c					\
 	syssignal.c					\
+	timespecops.c					\
 	timetoa.c					\
 	timevalops.c					\
+	timexsup.c					\
 	uglydate.c					\
 	vint64ops.c					\
 	work_fork.c					\
@@ -834,6 +840,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netscope.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calgps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto_rnd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_libopts.Po@am__quote@
@@ -870,8 +877,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespecops.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetoa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timexsup.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsmemcmp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@
--- contrib/ntp/libntp/decodenetnum.c.orig
+++ contrib/ntp/libntp/decodenetnum.c
@@ -15,6 +15,19 @@
 #include "ntp_stdlib.h"
 #include "ntp_assert.h"
 
+#define PORTSTR(x) _PORTSTR(x)
+#define _PORTSTR(x) #x
+
+static int
+isnumstr(
+	const char *s
+	)
+{
+	while (*s >= '0' && *s <= '9')
+		++s;
+	return !*s;
+}
+
 /*
  * decodenetnum		convert text IP address and port to sockaddr_u
  *
@@ -26,22 +39,25 @@
 	sockaddr_u *netnum
 	)
 {
+	static const char * const servicename = "ntp";
+	static const char * const serviceport = PORTSTR(NTP_PORT);
+	
 	struct addrinfo hints, *ai = NULL;
 	int err;
-	u_short port;
-	const char *cp;
+	const char *host_str;
 	const char *port_str;
 	char *pp;
 	char *np;
-	char name[80];
+	char nbuf[80];
 
 	REQUIRE(num != NULL);
 
-	if (strlen(num) >= sizeof(name)) {
-		return 0;
+	if (strlen(num) >= sizeof(nbuf)) {
+		printf("length error\n");
+		return FALSE;
 	}
 
-	port_str = NULL;
+	port_str = servicename;
 	if ('[' != num[0]) {
 		/*
 		 * to distinguish IPv6 embedded colons from a port
@@ -50,37 +66,53 @@
 		 */
 		pp = strchr(num, ':');
 		if (NULL == pp)
-			cp = num;	/* no colons */
+			host_str = num;	/* no colons */
 		else if (NULL != strchr(pp + 1, ':'))
-			cp = num;	/* two or more colons */
+			host_str = num;	/* two or more colons */
 		else {			/* one colon */
-			strlcpy(name, num, sizeof(name));
-			cp = name;
-			pp = strchr(cp, ':');
+			strlcpy(nbuf, num, sizeof(nbuf));
+			host_str = nbuf;
+			pp = strchr(nbuf, ':');
 			*pp = '\0';
 			port_str = pp + 1;
 		}
 	} else {
-		cp = num + 1;
-		np = name; 
-		while (*cp && ']' != *cp)
-			*np++ = *cp++;
+		host_str = np = nbuf; 
+		while (*++num && ']' != *num)
+			*np++ = *num;
 		*np = 0;
-		if (']' == cp[0] && ':' == cp[1] && '\0' != cp[2])
-			port_str = &cp[2];
-		cp = name; 
+		if (']' == num[0] && ':' == num[1] && '\0' != num[2])
+			port_str = &num[2];
 	}
+	if ( ! *host_str)
+		return FALSE;
+	if ( ! *port_str)
+		port_str = servicename;
+	
 	ZERO(hints);
-	hints.ai_flags = Z_AI_NUMERICHOST;
-	err = getaddrinfo(cp, "ntp", &hints, &ai);
+	hints.ai_flags |= Z_AI_NUMERICHOST;
+	if (isnumstr(port_str))
+		hints.ai_flags |= Z_AI_NUMERICSERV;
+	err = getaddrinfo(host_str, port_str, &hints, &ai);
+	/* retry with default service name if the service lookup failed */ 
+	if (err == EAI_SERVICE && strcmp(port_str, servicename)) {
+		hints.ai_flags &= ~Z_AI_NUMERICSERV;
+		port_str = servicename;
+		err = getaddrinfo(host_str, port_str, &hints, &ai);
+	}
+	/* retry another time with default service port if the service lookup failed */ 
+	if (err == EAI_SERVICE && strcmp(port_str, serviceport)) {
+		hints.ai_flags |= Z_AI_NUMERICSERV;
+		port_str = serviceport;
+		err = getaddrinfo(host_str, port_str, &hints, &ai);
+	}
 	if (err != 0)
-		return 0;
+		return FALSE;
+
 	INSIST(ai->ai_addrlen <= sizeof(*netnum));
 	ZERO(*netnum);
 	memcpy(netnum, ai->ai_addr, ai->ai_addrlen);
 	freeaddrinfo(ai);
-	if (NULL == port_str || 1 != sscanf(port_str, "%hu", &port))
-		port = NTP_PORT;
-	SET_PORT(netnum, port);
-	return 1;
+
+	return TRUE;
 }
--- contrib/ntp/libntp/dofptoa.c.orig
+++ contrib/ntp/libntp/dofptoa.c
@@ -12,7 +12,7 @@
 char *
 dofptoa(
 	u_fp fpv,
-	int neg,
+	char sign,
 	short ndec,
 	int msec
 	)
@@ -106,8 +106,8 @@
 	 * Copy it into the buffer, asciizing as we go.
 	 */
 	bp = buf;
-	if (neg)
-	    *bp++ = '-';
+	if (sign)
+	    *bp++ = sign;
 	
 	while (cp < cpend) {
 		if (cp == cpdec)
@@ -135,7 +135,7 @@
 		plusfp = (u_fp)fpv;
 	}
 
-	return dofptoa(plusfp, neg, ndec, FALSE);
+	return dofptoa(plusfp, (neg?'-':0), ndec, FALSE);
 }
 
 
@@ -155,5 +155,5 @@
 		plusfp = (u_fp)fpv;
 	}
 
-	return dofptoa(plusfp, neg, ndec, TRUE);
+	return dofptoa(plusfp, (neg?'-':0), ndec, TRUE);
 }
--- contrib/ntp/libntp/dolfptoa.c.orig
+++ contrib/ntp/libntp/dolfptoa.c
@@ -13,7 +13,7 @@
 dolfptoa(
 	u_int32 fpi,
 	u_int32 fpv,
-	int neg,
+	char sign,
 	short ndec,
 	int msec
 	)
@@ -120,8 +120,8 @@
 		cp = cpdec - 1;
 
 	bp = buf;
-	if (neg)
-		*bp++ = '-';
+	if (sign)
+		*bp++ = sign;
 	while (cp < cpend) {
 		if (cp == cpdec)
 			*bp++ = '.';
@@ -150,7 +150,7 @@
 		M_NEG(fpi, fpf);
 	}
 
-	return dolfptoa(fpi, fpf, isneg, ndec, FALSE);
+	return dolfptoa(fpi, fpf, (isneg?'-':'+'), ndec, FALSE);
 }
 
 
@@ -168,7 +168,7 @@
 		M_NEG(fpi, fpf);
 	}
 
-	return dolfptoa(fpi, fpf, isneg, ndec, TRUE);
+	return dolfptoa(fpi, fpf, (isneg?'-':'+'), ndec, TRUE);
 }
 
 
--- contrib/ntp/libntp/mstolfp.c.orig
+++ contrib/ntp/libntp/mstolfp.c
@@ -22,7 +22,7 @@
 	/*
 	 * We understand numbers of the form:
 	 *
-	 * [spaces][-][digits][.][digits][spaces|\n|\0]
+	 * [spaces][-|+][digits][.][digits][spaces|\n|\0]
 	 *
 	 * This is one enormous hack.  Since I didn't feel like
 	 * rewriting the decoding routine for milliseconds, what
@@ -35,9 +35,8 @@
 	while (isspace((unsigned char)*cp))
 	    cp++;
 	
-	if (*cp == '-') {
-		*bp++ = '-';
-		cp++;
+	if (*cp == '-' || *cp == '+') {
+		*bp++ = *cp++;
 	}
 
 	if (*cp != '.' && !isdigit((unsigned char)*cp))
--- contrib/ntp/libntp/msyslog.c.orig
+++ contrib/ntp/libntp/msyslog.c
@@ -582,3 +582,41 @@
 		msyslog(LOG_ERR, "Cannot reopen log file %s, %m",
 			syslog_fname);
 }
+
+/* Helper for unit tests, where stdout + stderr are piped to the same
+ * stream.  This works moderately reliable only if both streams are
+ * unbuffered or line buffered.  Unfortunately stdout can be fully
+ * buffered on pipes or files...
+ */
+int
+change_iobufs(
+	int how
+	)
+{
+	int	retv = 0;
+	
+#   ifdef HAVE_SETVBUF
+
+	int mode;
+
+	switch (how) {
+	case 0 : mode = _IONBF; break; /* no buffering   */
+	case 1 : mode = _IOLBF; break; /* line buffering */
+	case 2 : mode = _IOFBF; break; /* full buffering */
+	default: mode = _IOLBF; break; /* line buffering */
+	}
+	
+	retv = 1;
+	if (setvbuf(stdout, NULL, mode, BUFSIZ) != 0)
+		retv = -1;
+	if (setvbuf(stderr, NULL, mode, BUFSIZ) != 0)
+		retv = -1;
+
+#   else
+	
+	UNUSED_ARG(how);
+	
+#   endif
+	
+	return retv;
+}
--- contrib/ntp/libntp/ntp_calendar.c.orig
+++ contrib/ntp/libntp/ntp_calendar.c
@@ -40,16 +40,10 @@
  * complement can be easily created using XOR and a mask.
  *
  * Finally, check for overflow conditions is minimal. There are only two
- * calculation steps in the whole calendar that suffer from an internal
- * overflow, and these conditions are checked: errno is set to EDOM and
- * the results are clamped/saturated in this case.  All other functions
- * do not suffer from internal overflow and simply return the result
- * truncated to 32 bits.
- *
- * This is a sacrifice made for execution speed.  Since a 32-bit day
- * counter covers +/- 5,879,610 years and the clamp limits the effective
- * range to +/-2.9 million years, this should not pose a problem here.
- *
+ * calculation steps in the whole calendar that potentially suffer from
+ * an internal overflow, and these are coded in a way that avoids
+ * it. All other functions do not suffer from internal overflow and
+ * simply return the result truncated to 32 bits.
  */
 
 #include <config.h>
@@ -61,6 +55,9 @@
 #include "ntp_fp.h"
 #include "ntp_unixtime.h"
 
+#include "ntpd.h"
+#include "lib_strbuf.h"
+
 /* For now, let's take the conservative approach: if the target property
  * macros are not defined, check a few well-known compiler/architecture
  * settings. Default is to assume that the representation of signed
@@ -88,6 +85,10 @@
 # define TARGET_HAS_SAR 0
 #endif
 
+#if !defined(HAVE_64BITREGS) && defined(UINT64_MAX) && (SIZE_MAX >= UINT64_MAX)
+# define HAVE_64BITREGS
+#endif
+
 /*
  *---------------------------------------------------------------------
  * replacing the 'time()' function
@@ -139,7 +140,7 @@
 	 * we do this only if 'int' has at least 4 bytes.
 	 */
 	return (uint32_t)(v >> 31);
-	
+
 #   else
 
 	/* This should be a rather generic approach for getting a sign
@@ -146,40 +147,8 @@
 	 * extension mask...
 	 */
 	return UINT32_C(0) - (uint32_t)(v < 0);
-	
-#   endif
-}
 
-static inline uint32_t
-int32_to_uint32_2cpl(
-	const int32_t v)
-{
-	uint32_t vu;
-	
-#   if TARGET_HAS_2CPL
-
-	/* Just copy through the 32 bits from the signed value if we're
-	 * on a two's complement target.
-	 */
-	vu = (uint32_t)v;
-	
-#   else
-
-	/* Convert from signed int to unsigned int two's complement. Do
-	 * not make any assumptions about the representation of signed
-	 * integers, but make sure signed integer overflow cannot happen
-	 * here. A compiler on a two's complement target *might* find
-	 * out that this is just a complicated cast (as above), but your
-	 * mileage might vary.
-	 */
-	if (v < 0)
-		vu = ~(uint32_t)(-(v + 1));
-	else
-		vu = (uint32_t)v;
-	
 #   endif
-	
-	return vu;
 }
 
 static inline int32_t
@@ -187,7 +156,7 @@
 	const uint32_t vu)
 {
 	int32_t v;
-	
+
 #   if TARGET_HAS_2CPL
 
 	/* Just copy through the 32 bits from the unsigned value if
@@ -206,31 +175,12 @@
 		v = -(int32_t)(~vu) - 1;
 	else
 		v = (int32_t)vu;
-	
+
 #   endif
-	
+
 	return v;
 }
 
-/* Some of the calculations need to multiply the input by 4 before doing
- * a division. This can cause overflow and strange results. Therefore we
- * clamp / saturate the input operand. And since we do the calculations
- * in unsigned int with an extra sign flag/mask, we only loose one bit
- * of the input value range.
- */
-static inline uint32_t
-uint32_saturate(
-	uint32_t vu,
-	uint32_t mu)
-{
-	static const uint32_t limit = UINT32_MAX/4u;
-	if ((mu ^ vu) > limit) {
-		vu    = mu ^ limit;
-		errno = EDOM;
-	}
-	return vu;
-}
-
 /*
  *---------------------------------------------------------------------
  * Convert between 'time_t' and 'vint64'
@@ -335,7 +285,7 @@
 	 * Note that MSVC declares DATE and TIME to be in the local time
 	 * zone, while neither the C standard nor the GCC docs make any
 	 * statement about this. As a result, we may be +/-12hrs off
-	 * UTC.  But for practical purposes, this should not be a
+	 * UTC.	 But for practical purposes, this should not be a
 	 * problem.
 	 *
 	 */
@@ -349,12 +299,12 @@
 	char		  monstr[4];
 	const char *	  cp;
 	unsigned short	  hour, minute, second, day, year;
- 	/* Note: The above quantities are used for sscanf 'hu' format,
+	/* Note: The above quantities are used for sscanf 'hu' format,
 	 * so using 'uint16_t' is contra-indicated!
 	 */
 
 #   ifdef DEBUG
-	static int        ignore  = 0;
+	static int	  ignore  = 0;
 #   endif
 
 	ZERO(*jd);
@@ -398,19 +348,6 @@
  *---------------------------------------------------------------------
  */
 
-/* month table for a year starting with March,1st */
-static const uint16_t shift_month_table[13] = {
-	0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337, 366
-};
-
-/* month tables for years starting with January,1st; regular & leap */
-static const uint16_t real_month_table[2][13] = {
-	/* -*- table for regular years -*- */
-	{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
-	/* -*- table for leap years -*- */
-	{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
-};
-
 /*
  * Some notes on the terminology:
  *
@@ -452,6 +389,60 @@
 
 /*
  *---------------------------------------------------------------------
+ * fast modulo 7 operations (floor/mathematical convention)
+ *---------------------------------------------------------------------
+ */
+int
+u32mod7(
+	uint32_t x
+	)
+{
+	/* This is a combination of tricks from "Hacker's Delight" with
+	 * some modifications, like a multiplication that rounds up to
+	 * drop the final adjustment stage.
+	 *
+	 * Do a partial reduction by digit sum to keep the value in the
+	 * range permitted for the mul/shift stage. There are several
+	 * possible and absolutely equivalent shift/mask combinations;
+	 * this one is ARM-friendly because of a mask that fits into 16
+	 * bit.
+	 */
+	x = (x >> 15) + (x & UINT32_C(0x7FFF));
+	/* Take reminder as (mod 8) by mul/shift. Since the multiplier
+	 * was calculated using ceil() instead of floor(), it skips the
+	 * value '7' properly.
+	 *    M <- ceil(ldexp(8/7, 29))
+	 */
+	return (int)((x * UINT32_C(0x24924925)) >> 29);
+}
+
+int
+i32mod7(
+	int32_t x
+	)
+{
+	/* We add (2**32 - 2**32 % 7), which is (2**32 - 4), to negative
+	 * numbers to map them into the postive range. Only the term '-4'
+	 * survives, obviously.
+	 */
+	uint32_t ux = (uint32_t)x;
+	return u32mod7((x < 0) ? (ux - 4u) : ux);
+}
+
+uint32_t
+i32fmod(
+	int32_t	 x,
+	uint32_t d
+	)
+{
+	uint32_t ux = (uint32_t)x;
+	uint32_t sf = UINT32_C(0) - (x < 0);
+	ux = (sf ^ ux ) % d;
+	return (d & sf) + (sf ^ ux);
+}
+
+/*
+ *---------------------------------------------------------------------
  * Do a periodic extension of 'value' around 'pivot' with a period of
  * 'cycle'.
  *
@@ -494,7 +485,7 @@
  * division routine for 64bit ops on a platform that can only do
  * 32/16bit divisions and is still performant is a bit more
  * difficult. Since most usecases can be coded in a way that does only
- * require the 32-bit version a 64bit version is NOT provided here.
+ * require the 32bit version a 64bit version is NOT provided here.
  *---------------------------------------------------------------------
  */
 int32_t
@@ -504,40 +495,38 @@
 	int32_t cycle
 	)
 {
-	uint32_t diff;
-	char	 cpl = 0; /* modulo complement flag */
-	char	 neg = 0; /* sign change flag	    */
+	/* Implement a 4-quadrant modulus calculation by 2 2-quadrant
+	 * branches, one for positive and one for negative dividers.
+	 * Everything else can be handled by bit level logic and
+	 * conditional one's complement arithmetic.  By convention, we
+	 * assume
+	 *
+	 * x % b == 0  if  |b| < 2
+	 *
+	 * that is, we don't actually divide for cycles of -1,0,1 and
+	 * return the pivot value in that case.
+	 */
+	uint32_t	uv = (uint32_t)value;
+	uint32_t	up = (uint32_t)pivot;
+	uint32_t	uc, sf;
 
-	/* make the cycle positive and adjust the flags */
-	if (cycle < 0) {
-		cycle = - cycle;
-		neg ^= 1;
-		cpl ^= 1;
+	if (cycle > 1)
+	{
+		uc = (uint32_t)cycle;
+		sf = UINT32_C(0) - (value < pivot);
+
+		uv = sf ^ (uv - up);
+		uv %= uc;
+		pivot += (uc & sf) + (sf ^ uv);
 	}
-	/* guard against div by zero or one */
-	if (cycle > 1) {
-		/*
-		 * Get absolute difference as unsigned quantity and
-		 * the complement flag. This is done by always
-		 * subtracting the smaller value from the bigger
-		 * one.
-		 */
-		if (value >= pivot) {
-			diff = int32_to_uint32_2cpl(value)
-			     - int32_to_uint32_2cpl(pivot);
-		} else {
-			diff = int32_to_uint32_2cpl(pivot)
-			     - int32_to_uint32_2cpl(value);
-			cpl ^= 1;
-		}
-		diff %= (uint32_t)cycle;
-		if (diff) {
-			if (cpl)
-				diff = (uint32_t)cycle - diff;
-			if (neg)
-				diff = ~diff + 1;
-			pivot += uint32_2cpl_to_int32(diff);
-		}
+	else if (cycle < -1)
+	{
+		uc = ~(uint32_t)cycle + 1;
+		sf = UINT32_C(0) - (value > pivot);
+
+		uv = sf ^ (up - uv);
+		uv %= uc;
+		pivot -= (uc & sf) + (sf ^ uv);
 	}
 	return pivot;
 }
@@ -557,7 +546,7 @@
  * standard. (Though this is admittedly not one of the most 'natural'
  * aspects of the 'C' language and easily to get wrong.)
  *
- * see 
+ * see
  *	http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
  *	"ISO/IEC 9899:201x Committee Draft — April 12, 2011"
  *	6.4.4.1 Integer constants, clause 5
@@ -565,7 +554,7 @@
  * why there is no sign extension/overflow problem here.
  *
  * But to ease the minds of the doubtful, I added back the 'u' qualifiers
- * that somehow got lost over the last years. 
+ * that somehow got lost over the last years.
  */
 
 
@@ -574,7 +563,7 @@
  * Convert a timestamp in NTP scale to a 64bit seconds value in the UN*X
  * scale with proper epoch unfolding around a given pivot or the current
  * system time. This function happily accepts negative pivot values as
- * timestamps befor 1970-01-01, so be aware of possible trouble on
+ * timestamps before 1970-01-01, so be aware of possible trouble on
  * platforms with 32bit 'time_t'!
  *
  * This is also a periodic extension, but since the cycle is 2^32 and
@@ -690,74 +679,146 @@
 	)
 {
 	ntpcal_split res;
-	uint32_t Q;
+	uint32_t Q, R;
 
-#   if defined(HAVE_INT64)
-	
-	/* Manual floor division by SECSPERDAY. This uses the one's
-	 * complement trick, too, but without an extra flag value: The
-	 * flag would be 64bit, and that's a bit of overkill on a 32bit
-	 * target that has to use a register pair for a 64bit number.
+#   if defined(HAVE_64BITREGS)
+
+	/* Assume we have 64bit registers an can do a divison by
+	 * constant reasonably fast using the one's complement trick..
 	 */
+	uint64_t sf64 = (uint64_t)-(ts->q_s < 0);
+	Q = (uint32_t)(sf64 ^ ((sf64 ^ ts->Q_s) / SECSPERDAY));
+	R = (uint32_t)(ts->Q_s - Q * SECSPERDAY);
+
+#   elif defined(UINT64_MAX) && !defined(__arm__)
+
+	/* We rely on the compiler to do efficient 64bit divisions as
+	 * good as possible. Which might or might not be true. At least
+	 * for ARM CPUs, the sum-by-digit code in the next section is
+	 * faster for many compilers. (This might change over time, but
+	 * the 64bit-by-32bit division will never outperform the exact
+	 * division by a substantial factor....)
+	 */
 	if (ts->q_s < 0)
 		Q = ~(uint32_t)(~ts->Q_s / SECSPERDAY);
 	else
-		Q = (uint32_t)(ts->Q_s / SECSPERDAY);
+		Q =  (uint32_t)( ts->Q_s / SECSPERDAY);
+	R = ts->D_s.lo - Q * SECSPERDAY;
 
 #   else
 
-	uint32_t ah, al, sflag, A;
-
-	/* get operand into ah/al (either ts or ts' one's complement,
-	 * for later floor division)
-	 */
-	sflag = int32_sflag(ts->d_s.hi);
-	ah = sflag ^ ts->D_s.hi;
-	al = sflag ^ ts->D_s.lo;
-
-	/* Since 86400 == 128*675 we can drop the least 7 bits and
-	 * divide by 675 instead of 86400. Then the maximum remainder
-	 * after each devision step is 674, and we need 10 bits for
-	 * that. So in the next step we can shift in 22 bits from the
-	 * numerator.
+	/* We don't have 64bit regs. That hurts a bit.
 	 *
-	 * Therefore we load the accu with the top 13 bits (51..63) in
-	 * the first shot. We don't have to remember the quotient -- it
-	 * would be shifted out anyway.
+	 * Here we use a mean trick to get away with just one explicit
+	 * modulo operation and pure 32bit ops.
+	 *
+	 * Remember: 86400 <--> 128 * 675
+	 *
+	 * So we discard the lowest 7 bit and do an exact division by
+	 * 675, modulo 2**32.
+	 *
+	 * First we shift out the lower 7 bits.
+	 *
+	 * Then we use a digit-wise pseudo-reduction, where a 'digit' is
+	 * actually a 16-bit group. This is followed by a full reduction
+	 * with a 'true' division step. This yields the modulus of the
+	 * full 64bit value. The sign bit gets some extra treatment.
+	 *
+	 * Then we decrement the lower limb by that modulus, so it is
+	 * exactly divisible by 675. [*]
+	 *
+	 * Then we multiply with the modular inverse of 675 (mod 2**32)
+	 * and voila, we have the result.
+	 *
+	 * Special Thanks to Henry S. Warren and his "Hacker's delight"
+	 * for giving that idea.
+	 *
+	 * (Note[*]: that's not the full truth. We would have to
+	 * subtract the modulus from the full 64 bit number to get a
+	 * number that is divisible by 675. But since we use the
+	 * multiplicative inverse (mod 2**32) there's no reason to carry
+	 * the subtraction into the upper bits!)
 	 */
-	A = ah >> 19;
-	if (A >= 675)
-		A = (A % 675u);
+	uint32_t al = ts->D_s.lo;
+	uint32_t ah = ts->D_s.hi;
 
-	/* Now assemble the remainder with bits 29..50 from the
-	 * numerator and divide. This creates the upper ten bits of the
-	 * quotient. (Well, the top 22 bits of a 44bit result. But that
-	 * will be truncated to 32 bits anyway.)
-	 */
-	A = (A << 19) | (ah & 0x0007FFFFu);
-	A = (A <<  3) | (al >> 29);
-	Q = A / 675u;
-	A = A % 675u;
+	/* shift out the lower 7 bits, smash sign bit */
+	al = (al >> 7) | (ah << 25);
+	ah = (ah >> 7) & 0x00FFFFFFu;
 
-	/* Now assemble the remainder with bits 7..28 from the numerator
-	 * and do a final division step.
-	 */
-	A = (A << 22) | ((al >> 7) & 0x003FFFFFu);
-	Q = (Q << 22) | (A / 675u);
+	R  = (ts->d_s.hi < 0) ? 239 : 0;/* sign bit value */
+	R += (al & 0xFFFF);
+	R += (al >> 16	 ) * 61u;	/* 2**16 % 675 */
+	R += (ah & 0xFFFF) * 346u;	/* 2**32 % 675 */
+	R += (ah >> 16	 ) * 181u;	/* 2**48 % 675 */
+	R %= 675u;			/* final reduction */
+	Q  = (al - R) * 0x2D21C10Bu;	/* modinv(675, 2**32) */
+	R  = (R << 7) | (ts->d_s.lo & 0x07F);
 
-	/* The last 7 bits get simply dropped, as they have no affect on
-	 * the quotient when dividing by 86400.
+#   endif
+
+	res.hi = uint32_2cpl_to_int32(Q);
+	res.lo = R;
+
+	return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Split a 64bit seconds value into elapsed weeks in 'res.hi' and
+ * elapsed seconds since week start in 'res.lo' using explicit floor
+ * division. This function happily accepts negative time values as
+ * timestamps before the respective epoch start.
+ *---------------------------------------------------------------------
+ */
+ntpcal_split
+ntpcal_weeksplit(
+	const vint64 *ts
+	)
+{
+	ntpcal_split res;
+	uint32_t Q, R;
+
+	/* This is a very close relative to the day split function; for
+	 * details, see there!
 	 */
 
-	/* apply sign correction and calculate the true floor
-	 * remainder.
-	 */
-	Q ^= sflag;
-	
+#   if defined(HAVE_64BITREGS)
+
+	uint64_t sf64 = (uint64_t)-(ts->q_s < 0);
+	Q = (uint32_t)(sf64 ^ ((sf64 ^ ts->Q_s) / SECSPERWEEK));
+	R = (uint32_t)(ts->Q_s - Q * SECSPERWEEK);
+
+#   elif defined(UINT64_MAX) && !defined(__arm__)
+
+	if (ts->q_s < 0)
+		Q = ~(uint32_t)(~ts->Q_s / SECSPERWEEK);
+	else
+		Q =  (uint32_t)( ts->Q_s / SECSPERWEEK);
+	R = ts->D_s.lo - Q * SECSPERWEEK;
+
+#   else
+
+	/* Remember: 7*86400 <--> 604800 <--> 128 * 4725 */
+	uint32_t al = ts->D_s.lo;
+	uint32_t ah = ts->D_s.hi;
+
+	al = (al >> 7) | (ah << 25);
+	ah = (ah >> 7) & 0x00FFFFFF;
+
+	R  = (ts->d_s.hi < 0) ? 2264 : 0;/* sign bit value */
+	R += (al & 0xFFFF);
+	R += (al >> 16	 ) * 4111u;	/* 2**16 % 4725 */
+	R += (ah & 0xFFFF) * 3721u;	/* 2**32 % 4725 */
+	R += (ah >> 16	 ) * 2206u;	/* 2**48 % 4725 */
+	R %= 4725u;			/* final reduction */
+	Q  = (al - R) * 0x98BBADDDu;	/* modinv(4725, 2**32) */
+	R  = (R << 7) | (ts->d_s.lo & 0x07F);
+
 #   endif
-	
+
 	res.hi = uint32_2cpl_to_int32(Q);
-	res.lo = ts->D_s.lo - Q * SECSPERDAY;
+	res.lo = R;
 
 	return res;
 }
@@ -779,23 +840,23 @@
 	 * one's complement trick and factoring out the intermediate XOR
 	 * ops to reduce the number of operations.
 	 */
-	uint32_t us, um, uh, ud, sflag;
+	uint32_t us, um, uh, ud, sf32;
 
-	sflag = int32_sflag(ts);
-	us    = int32_to_uint32_2cpl(ts);
+	sf32 = int32_sflag(ts);
 
-	um = (sflag ^ us) / SECSPERMIN;
+	us = (uint32_t)ts;
+	um = (sf32 ^ us) / SECSPERMIN;
 	uh = um / MINSPERHR;
 	ud = uh / HRSPERDAY;
 
-	um ^= sflag;
-	uh ^= sflag;
-	ud ^= sflag;
+	um ^= sf32;
+	uh ^= sf32;
+	ud ^= sf32;
 
 	split[0] = (int32_t)(uh - ud * HRSPERDAY );
 	split[1] = (int32_t)(um - uh * MINSPERHR );
 	split[2] = (int32_t)(us - um * SECSPERMIN);
-	
+
 	return uint32_2cpl_to_int32(ud);
 }
 
@@ -815,45 +876,77 @@
 	int  *isleapyear
 	)
 {
-	/* Use the fast cyclesplit algorithm here, to calculate the
+	/* Use the fast cycle split algorithm here, to calculate the
 	 * centuries and years in a century with one division each. This
 	 * reduces the number of division operations to two, but is
-	 * susceptible to internal range overflow. We make sure the
-	 * input operands are in the safe range; this still gives us
-	 * approx +/-2.9 million years.
+	 * susceptible to internal range overflow. We take some extra
+	 * steps to avoid the gap.
 	 */
 	ntpcal_split res;
 	int32_t	 n100, n001; /* calendar year cycles */
-	uint32_t uday, Q, sflag;
+	uint32_t uday, Q;
 
-	/* split off centuries first */
-	sflag = int32_sflag(days);
-	uday  = uint32_saturate(int32_to_uint32_2cpl(days), sflag);
-	uday  = (4u * uday) | 3u;
-	Q    = sflag ^ ((sflag ^ uday) / GREGORIAN_CYCLE_DAYS);
-	uday = uday - Q * GREGORIAN_CYCLE_DAYS;
+	/* split off centuries first
+	 *
+	 * We want to execute '(days * 4 + 3) /% 146097' under floor
+	 * division rules in the first step. Well, actually we want to
+	 * calculate 'floor((days + 0.75) / 36524.25)', but we want to
+	 * do it in scaled integer calculation.
+	 */
+#   if defined(HAVE_64BITREGS)
+
+	/* not too complicated with an intermediate 64bit value */
+	uint64_t	ud64, sf64;
+	ud64 = ((uint64_t)days << 2) | 3u;
+	sf64 = (uint64_t)-(days < 0);
+	Q    = (uint32_t)(sf64 ^ ((sf64 ^ ud64) / GREGORIAN_CYCLE_DAYS));
+	uday = (uint32_t)(ud64 - Q * GREGORIAN_CYCLE_DAYS);
 	n100 = uint32_2cpl_to_int32(Q);
-	
+
+#   else
+
+	/* '4*days+3' suffers from range overflow when going to the
+	 * limits. We solve this by doing an exact division (mod 2^32)
+	 * after caclulating the remainder first.
+	 *
+	 * We start with a partial reduction by digit sums, extracting
+	 * the upper bits from the original value before they get lost
+	 * by scaling, and do one full division step to get the true
+	 * remainder.  Then a final multiplication with the
+	 * multiplicative inverse of 146097 (mod 2^32) gives us the full
+	 * quotient.
+	 *
+	 * (-2^33) % 146097	--> 130717    : the sign bit value
+	 * ( 2^20) % 146097	--> 25897     : the upper digit value
+	 * modinv(146097, 2^32) --> 660721233 : the inverse
+	 */
+	uint32_t ux = ((uint32_t)days << 2) | 3;
+	uday  = (days < 0) ? 130717u : 0u;	    /* sign dgt */
+	uday += ((days >> 18) & 0x01FFFu) * 25897u; /* hi dgt (src!) */
+	uday += (ux & 0xFFFFFu);		    /* lo dgt */
+	uday %= GREGORIAN_CYCLE_DAYS;		    /* full reduction */
+	Q     = (ux  - uday) * 660721233u;	    /* exact div */
+	n100  = uint32_2cpl_to_int32(Q);
+
+#   endif
+
 	/* Split off years in century -- days >= 0 here, and we're far
 	 * away from integer overflow trouble now. */
 	uday |= 3;
-	n001 = uday / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
-	uday = uday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+	n001  = uday / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+	uday -= n001 * GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
 
 	/* Assemble the year and day in year */
 	res.hi = n100 * 100 + n001;
 	res.lo = uday / 4u;
 
-	/* Eventually set the leap year flag. Note: 0 <= n001 <= 99 and
-	 * Q is still the two's complement representation of the
-	 * centuries: The modulo 4 ops can be done with masking here.
-	 * We also shift the year and the century by one, so the tests
-	 * can be done against zero instead of 3.
-	 */
-	if (isleapyear)
-		*isleapyear = !((n001+1) & 3)
-		    && ((n001 != 99) || !((Q+1) & 3));
-	
+	/* Possibly set the leap year flag */
+	if (isleapyear) {
+		uint32_t tc = (uint32_t)n100 + 1;
+		uint32_t ty = (uint32_t)n001 + 1;
+		*isleapyear = !(ty & 3)
+		    && ((ty != 100) || !(tc & 3));
+	}
 	return res;
 }
 
@@ -870,22 +963,24 @@
 ntpcal_split
 ntpcal_split_yeardays(
 	int32_t eyd,
-	int     isleapyear
+	int	isleap
 	)
 {
-	ntpcal_split    res;
-	const uint16_t *lt;	/* month length table	*/
+	/* Use the unshifted-year, February-with-30-days approach here.
+	 * Fractional interpolations are used in both directions, with
+	 * the smallest power-of-two divider to avoid any true division.
+	 */
+	ntpcal_split	res = {-1, -1};
 
-	/* check leap year flag and select proper table */
-	lt = real_month_table[(isleapyear != 0)];
-	if (0 <= eyd && eyd < lt[12]) {
-		/* get zero-based month by approximation & correction step */
-		res.hi = eyd >> 5;	   /* approx month; might be 1 too low */
-		if (lt[res.hi + 1] <= eyd) /* fixup approximative month value  */
-			res.hi += 1;
-		res.lo = eyd - lt[res.hi];
-	} else {
-		res.lo = res.hi = -1;
+	/* convert 'isleap' to number of defective days */
+	isleap = 1 + !isleap;
+	/* adjust for February of 30 nominal days */
+	if (eyd >= 61 - isleap)
+		eyd += isleap;
+	/* if in range, convert to months and days in month */
+	if (eyd >= 0 && eyd < 367) {
+		res.hi = (eyd * 67 + 32) >> 11;
+		res.lo = eyd - ((489 * res.hi + 8) >> 4);
 	}
 
 	return res;
@@ -906,16 +1001,8 @@
 	int	     leapy;
 	u_int	     ymask;
 
-	/* Get day-of-week first. Since rd is signed, the remainder can
-	 * be in the range [-6..+6], but the assignment to an unsigned
-	 * variable maps the negative values to positive values >=7.
-	 * This makes the sign correction look strange, but adding 7
-	 * causes the needed wrap-around into the desired value range of
-	 * zero to six, both inclusive.
-	 */
-	jd->weekday = rd % DAYSPERWEEK;
-	if (jd->weekday >= DAYSPERWEEK)	/* weekday is unsigned! */
-		jd->weekday += DAYSPERWEEK;
+	/* Get day-of-week first. It's simply the RD (mod 7)... */
+	jd->weekday = i32mod7(rd);
 
 	split = ntpcal_split_eradays(rd - 1, &leapy);
 	/* Get year and day-of-year, with overflow check. If any of the
@@ -952,9 +1039,7 @@
 	int	     leapy;
 
 	/* get day-of-week first */
-	utm->tm_wday = rd % DAYSPERWEEK;
-	if (utm->tm_wday < 0)
-		utm->tm_wday += DAYSPERWEEK;
+	utm->tm_wday = i32mod7(rd);
 
 	/* get year and day-of-year */
 	split = ntpcal_split_eradays(rd - 1, &leapy);
@@ -1087,6 +1172,53 @@
  * ====================================================================
  */
 
+#if !defined(HAVE_INT64)
+/* multiplication helper. Seconds in days and weeks are multiples of 128,
+ * and without that factor fit well into 16 bit. So a multiplication
+ * of 32bit by 16bit and some shifting can be used on pure 32bit machines
+ * with compilers that do not support 64bit integers.
+ *
+ * Calculate ( hi * mul * 128 ) + lo
+ */
+static vint64
+_dwjoin(
+	uint16_t	mul,
+	int32_t		hi,
+	int32_t		lo
+	)
+{
+	vint64		res;
+	uint32_t	p1, p2, sf;
+
+	/* get sign flag and absolute value of 'hi' in p1 */
+	sf = (uint32_t)-(hi < 0);
+	p1 = ((uint32_t)hi + sf) ^ sf;
+
+	/* assemble major units: res <- |hi| * mul */
+	res.D_s.lo = (p1 & 0xFFFF) * mul;
+	res.D_s.hi = 0;
+	p1 = (p1 >> 16) * mul;
+	p2 = p1 >> 16;
+	p1 = p1 << 16;
+	M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+
+	/* mul by 128, using shift: res <-- res << 7 */
+	res.D_s.hi = (res.D_s.hi << 7) | (res.D_s.lo >> 25);
+	res.D_s.lo = (res.D_s.lo << 7);
+
+	/* fix up sign: res <-- (res + [sf|sf]) ^ [sf|sf] */
+	M_ADD(res.D_s.hi, res.D_s.lo, sf, sf);
+	res.D_s.lo ^= sf;
+	res.D_s.hi ^= sf;
+
+	/* properly add seconds: res <-- res + [sx(lo)|lo] */
+	p2 = (uint32_t)-(lo < 0);
+	p1 = (uint32_t)lo;
+	M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+	return res;
+}
+#endif
+
 /*
  *---------------------------------------------------------------------
  * Merge a number of days and a number of seconds into seconds,
@@ -1109,43 +1241,37 @@
 
 #   else
 
-	uint32_t p1, p2;
-	int	 isneg;
+	res = _dwjoin(675, days, secs);
 
-	/*
-	 * res = days *86400 + secs, using manual 16/32 bit
-	 * multiplications and shifts.
-	 */
-	isneg = (days < 0);
-	if (isneg)
-		days = -days;
+#   endif
 
-	/* assemble days * 675 */
-	res.D_s.lo = (days & 0xFFFF) * 675u;
-	res.D_s.hi = 0;
-	p1 = (days >> 16) * 675u;
-	p2 = p1 >> 16;
-	p1 = p1 << 16;
-	M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+	return res;
+}
 
-	/* mul by 128, using shift */
-	res.D_s.hi = (res.D_s.hi << 7) | (res.D_s.lo >> 25);
-	res.D_s.lo = (res.D_s.lo << 7);
+/*
+ *---------------------------------------------------------------------
+ * Merge a number of weeks and a number of seconds into seconds,
+ * expressed in 64 bits to avoid overflow.
+ *---------------------------------------------------------------------
+ */
+vint64
+ntpcal_weekjoin(
+	int32_t week,
+	int32_t secs
+	)
+{
+	vint64 res;
 
-	/* fix sign */
-	if (isneg)
-		M_NEG(res.D_s.hi, res.D_s.lo);
+#   if defined(HAVE_INT64)
 
-	/* properly add seconds */
-	p2 = 0;
-	if (secs < 0) {
-		p1 = (uint32_t)-secs;
-		M_NEG(p2, p1);
-	} else {
-		p1 = (uint32_t)secs;
-	}
-	M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+	res.q_s	 = week;
+	res.q_s *= SECSPERWEEK;
+	res.q_s += secs;
 
+#   else
+
+	res = _dwjoin(4725, week, secs);
+
 #   endif
 
 	return res;
@@ -1167,11 +1293,11 @@
 	 * get away with only one true division and doing shifts otherwise.
 	 */
 
-	uint32_t sflag, sum, uyear;
+	uint32_t sf32, sum, uyear;
 
-	sflag = int32_sflag(years);
-	uyear = int32_to_uint32_2cpl(years);
-	uyear ^= sflag;
+	sf32  = int32_sflag(years);
+	uyear = (uint32_t)years;
+	uyear ^= sf32;
 
 	sum  = (uyear /=  4u);	/*   4yr rule --> IN  */
 	sum -= (uyear /= 25u);	/* 100yr rule --> OUT */
@@ -1183,7 +1309,7 @@
 	 * the one's complement would have to be done when
 	 * adding/subtracting the terms.
 	 */
-	return uint32_2cpl_to_int32(sflag ^ sum);
+	return uint32_2cpl_to_int32(sf32 ^ sum);
 }
 
 /*
@@ -1222,25 +1348,33 @@
 {
 	ntpcal_split res;
 
-	/* Add ten months and correct if needed. (It likely is...) */
-	res.lo  = m + 10;
-	res.hi  = (res.lo >= 12);
-	if (res.hi)
-		res.lo -= 12;
+	/* Add ten months with proper year adjustment. */
+	if (m < 2) {
+	    res.lo  = m + 10;
+	    res.hi  = 0;
+	} else {
+	    res.lo  = m - 2;
+	    res.hi  = 1;
+	}
 
-	/* if still out of range, normalise by floor division ... */
+	/* Possibly normalise by floor division. This does not hapen for
+	 * input in normal range. */
 	if (res.lo < 0 || res.lo >= 12) {
-		uint32_t mu, Q, sflag;
-		sflag = int32_sflag(res.lo);
-		mu    = int32_to_uint32_2cpl(res.lo);
-		Q     = sflag ^ ((sflag ^ mu) / 12u);
+		uint32_t mu, Q, sf32;
+		sf32 = int32_sflag(res.lo);
+		mu   = (uint32_t)res.lo;
+		Q    = sf32 ^ ((sf32 ^ mu) / 12u);
+
 		res.hi += uint32_2cpl_to_int32(Q);
-		res.lo  = mu - Q * 12u;
+		res.lo	= mu - Q * 12u;
 	}
-	
-	/* get cummulated days in year with unshift */
-	res.lo = shift_month_table[res.lo] - 306;
 
+	/* Get cummulated days in year with unshift. Use the fractional
+	 * interpolation with smallest possible power of two in the
+	 * divider.
+	 */
+	res.lo = ((res.lo * 979 + 16) >> 5) - 306;
+
 	return res;
 }
 
@@ -1292,8 +1426,9 @@
 	ntpcal_split tmp;
 
 	if (0 <= mons && mons < 12) {
-		years += 1;
-		mdays += real_month_table[is_leapyear(years)][mons];
+		if (mons >= 2)
+			mdays -= 2 - is_leapyear(years+1);
+		mdays += (489 * mons + 8) >> 4;
 	} else {
 		tmp = ntpcal_days_in_months(mons);
 		mdays += tmp.lo
@@ -1449,7 +1584,7 @@
 	const struct calendar *jd
 	)
 {
-	vint64  join;
+	vint64	join;
 	int32_t days, secs;
 
 	days = ntpcal_date_to_rd(jd) - DAY_UNIX_STARTS;
@@ -1470,7 +1605,7 @@
 int
 ntpcal_ntp64_to_date(
 	struct calendar *jd,
-	const vint64    *ntp
+	const vint64	*ntp
 	)
 {
 	ntpcal_split ds;
@@ -1519,7 +1654,7 @@
 	)
 {
 	/*
-	 * Get lower half of 64-bit NTP timestamp from date/time.
+	 * Get lower half of 64bit NTP timestamp from date/time.
 	 */
 	return ntpcal_date_to_ntp64(jd).d_s.lo;
 }
@@ -1624,7 +1759,7 @@
  *   w = (y * a	 + b ) / k
  *   y = (w * a' + b') / k'
  *
- * In this implementation the values of k and k' are chosen to be
+ * In this implementation the values of k and k' are chosen to be the
  * smallest possible powers of two, so the division can be implemented
  * as shifts if the optimiser chooses to do so.
  *
@@ -1640,20 +1775,20 @@
 isocal_weeks_in_years(
 	int32_t years
 	)
-{	
+{
 	/*
 	 * use: w = (y * 53431 + b[c]) / 1024 as interpolation
 	 */
 	static const uint16_t bctab[4] = { 157, 449, 597, 889 };
 
-	int32_t  cs, cw;
-	uint32_t cc, ci, yu, sflag;
+	int32_t	 cs, cw;
+	uint32_t cc, ci, yu, sf32;
 
-	sflag = int32_sflag(years);
-	yu    = int32_to_uint32_2cpl(years);
-	
+	sf32 = int32_sflag(years);
+	yu   = (uint32_t)years;
+
 	/* split off centuries, using floor division */
-	cc  = sflag ^ ((sflag ^ yu) / 100u);
+	cc  = sf32 ^ ((sf32 ^ yu) / 100u);
 	yu -= cc * 100u;
 
 	/* calculate century cycles shift and cycle index:
@@ -1666,9 +1801,9 @@
 	 * shifting.
 	 */
 	ci = cc * 3u + 1;
-	cs = uint32_2cpl_to_int32(sflag ^ ((sflag ^ ci) / 4u));
-	ci = ci % 4u;
-	
+	cs = uint32_2cpl_to_int32(sf32 ^ ((sf32 ^ ci) >> 2));
+	ci = ci & 3u;
+
 	/* Get weeks in century. Can use plain division here as all ops
 	 * are >= 0,  and let the compiler sort out the possible
 	 * optimisations.
@@ -1696,31 +1831,54 @@
 	static const uint16_t bctab[4] = { 85, 130, 17, 62 };
 
 	ntpcal_split res;
-	int32_t  cc, ci;
-	uint32_t sw, cy, Q, sflag;
+	int32_t	 cc, ci;
+	uint32_t sw, cy, Q;
 
-	/* Use two fast cycle-split divisions here. This is again
-	 * susceptible to internal overflow, so we check the range. This
-	 * still permits more than +/-20 million years, so this is
-	 * likely a pure academical problem.
+	/* Use two fast cycle-split divisions again. Herew e want to
+	 * execute '(weeks * 4 + 2) /% 20871' under floor division rules
+	 * in the first step.
 	 *
-	 * We want to execute '(weeks * 4 + 2) /% 20871' under floor
-	 * division rules in the first step.
+	 * This is of course (again) susceptible to internal overflow if
+	 * coded directly in 32bit. And again we use 64bit division on
+	 * a 64bit target and exact division after calculating the
+	 * remainder first on a 32bit target. With the smaller divider,
+	 * that's even a bit neater.
 	 */
-	sflag = int32_sflag(weeks);
-	sw  = uint32_saturate(int32_to_uint32_2cpl(weeks), sflag);
-	sw  = 4u * sw + 2;
-	Q   = sflag ^ ((sflag ^ sw) / GREGORIAN_CYCLE_WEEKS);
-	sw -= Q * GREGORIAN_CYCLE_WEEKS;
-	ci  = Q % 4u;
+#   if defined(HAVE_64BITREGS)
+
+	/* Full floor division with 64bit values. */
+	uint64_t sf64, sw64;
+	sf64 = (uint64_t)-(weeks < 0);
+	sw64 = ((uint64_t)weeks << 2) | 2u;
+	Q    = (uint32_t)(sf64 ^ ((sf64 ^ sw64) / GREGORIAN_CYCLE_WEEKS));
+	sw   = (uint32_t)(sw64 - Q * GREGORIAN_CYCLE_WEEKS);
+
+#   else
+
+	/* Exact division after calculating the remainder via partial
+	 * reduction by digit sum.
+	 * (-2^33) % 20871     --> 5491	     : the sign bit value
+	 * ( 2^20) % 20871     --> 5026	     : the upper digit value
+	 * modinv(20871, 2^32) --> 330081335 : the inverse
+	 */
+	uint32_t ux = ((uint32_t)weeks << 2) | 2;
+	sw  = (weeks < 0) ? 5491u : 0u;		  /* sign dgt */
+	sw += ((weeks >> 18) & 0x01FFFu) * 5026u; /* hi dgt (src!) */
+	sw += (ux & 0xFFFFFu);			  /* lo dgt */
+	sw %= GREGORIAN_CYCLE_WEEKS;		  /* full reduction */
+	Q   = (ux  - sw) * 330081335u;		  /* exact div */
+
+#   endif
+
+	ci  = Q & 3u;
 	cc  = uint32_2cpl_to_int32(Q);
 
 	/* Split off years; sw >= 0 here! The scaled weeks in the years
 	 * are scaled up by 157 afterwards.
-	 */ 
+	 */
 	sw  = (sw / 4u) * 157u + bctab[ci];
-	cy  = sw / 8192u;	/* ws >> 13 , let the compiler sort it out */
-	sw  = sw % 8192u;	/* ws & 8191, let the compiler sort it out */
+	cy  = sw / 8192u;	/* sw >> 13 , let the compiler sort it out */
+	sw  = sw % 8192u;	/* sw & 8191, let the compiler sort it out */
 
 	/* assemble elapsed years and downscale the elapsed weeks in
 	 * the year.
@@ -1743,8 +1901,8 @@
 	)
 {
 	ntpcal_split ds;
-	int32_t      ts[3];
-	uint32_t     uw, ud, sflag;
+	int32_t	     ts[3];
+	uint32_t     uw, ud, sf32;
 
 	/*
 	 * Split NTP time into days and seconds, shift days into CE
@@ -1760,10 +1918,11 @@
 
 	/* split days into days and weeks, using floor division in unsigned */
 	ds.hi += DAY_NTP_STARTS - 1; /* shift from NTP to RDN */
-	sflag = int32_sflag(ds.hi);
-	ud  = int32_to_uint32_2cpl(ds.hi);
-	uw  = sflag ^ ((sflag ^ ud) / DAYSPERWEEK);
-	ud -= uw * DAYSPERWEEK;
+	sf32 = int32_sflag(ds.hi);
+	ud   = (uint32_t)ds.hi;
+	uw   = sf32 ^ ((sf32 ^ ud) / DAYSPERWEEK);
+	ud  -= uw * DAYSPERWEEK;
+
 	ds.hi = uint32_2cpl_to_int32(uw);
 	ds.lo = ud;
 
@@ -1820,7 +1979,7 @@
 	)
 {
 	/*
-	 * Get lower half of 64-bit NTP timestamp from date/time.
+	 * Get lower half of 64bit NTP timestamp from date/time.
 	 */
 	return isocal_date_to_ntp64(id).d_s.lo;
 }
@@ -1839,7 +1998,7 @@
 {
 	struct calendar jd;
 	int32_t		ed;
-	
+
 	if (!ntpcal_get_build_date(&jd))
 		return NTP_TO_UNIX_DAYS;
 
@@ -1865,7 +2024,7 @@
 	int	rc, nc;
 	size_t	sl;
 
-	sl = strlen(str);	
+	sl = strlen(str);
 	rc = sscanf(str, "%4hu-%2hu-%2hu%n", &y, &m, &d, &nc);
 	if (rc == 3 && (size_t)nc == sl) {
 		if (m >= 1 && m <= 12 && d >= 1 && d <= 31)
@@ -1909,7 +2068,7 @@
 			(unsigned long)day);
 		day = NTP_TO_UNIX_DAYS;
 	}
-	retv = s_baseday; 
+	retv = s_baseday;
 	s_baseday = day;
 	ntpcal_rd_to_date(&jd, day + DAY_NTP_STARTS);
 	msyslog(LOG_INFO, "basedate set to %04hu-%02hu-%02hu",
@@ -1924,7 +2083,7 @@
 	ntpcal_rd_to_date(&jd, day + DAY_NTP_STARTS);
 	msyslog(LOG_INFO, "gps base set to %04hu-%02hu-%02hu (week %d)",
 		jd.year, (u_short)jd.month, (u_short)jd.monthday, s_gpsweek);
-	
+
 	return retv;
 }
 
@@ -1966,10 +2125,111 @@
     #if GPSWEEKS != 1024
     # error GPSWEEKS defined wrong -- should be 1024!
     #endif
-    
+
     uint32_t diff;
     diff = ((uint32_t)weekno - s_gpsweek) & (GPSWEEKS - 1);
     return s_gpsweek + diff;
 }
 
+/*
+ * ====================================================================
+ * misc. helpers
+ * ====================================================================
+ */
+
+/* --------------------------------------------------------------------
+ * reconstruct the centrury from a truncated date and a day-of-week
+ *
+ * Given a date with truncated year (2-digit, 0..99) and a day-of-week
+ * from 1(Mon) to 7(Sun), recover the full year between 1900AD and 2300AD.
+ */
+int32_t
+ntpcal_expand_century(
+	uint32_t y,
+	uint32_t m,
+	uint32_t d,
+	uint32_t wd)
+{
+	/* This algorithm is short but tricky... It's related to
+	 * Zeller's congruence, partially done backwards.
+	 *
+	 * A few facts to remember:
+	 *  1) The Gregorian calendar has a cycle of 400 years.
+	 *  2) The weekday of the 1st day of a century shifts by 5 days
+	 *     during a great cycle.
+	 *  3) For calendar math, a century starts with the 1st year,
+	 *     which is year 1, !not! zero.
+	 *
+	 * So we start with taking the weekday difference (mod 7)
+	 * between the truncated date (which is taken as an absolute
+	 * date in the 1st century in the proleptic calendar) and the
+	 * weekday given.
+	 *
+	 * When dividing this residual by 5, we obtain the number of
+	 * centuries to add to the base. But since the residual is (mod
+	 * 7), we have to make this an exact division by multiplication
+	 * with the modular inverse of 5 (mod 7), which is 3:
+	 *    3*5 === 1 (mod 7).
+	 *
+	 * If this yields a result of 4/5/6, the given date/day-of-week
+	 * combination is impossible, and we return zero as resulting
+	 * year to indicate failure.
+	 *
+	 * Then we remap the century to the range starting with year
+	 * 1900.
+	 */
+
+	uint32_t c;
+
+	/* check basic constraints */
+	if ((y >= 100u) || (--m >= 12u) || (--d >= 31u))
+		return 0;
+
+	if ((m += 10u) >= 12u)		/* shift base to prev. March,1st */
+		m -= 12u;
+	else if (--y >= 100u)
+		y += 100u;
+	d += y + (y >> 2) + 2u;		/* year share */
+	d += (m * 83u + 16u) >> 5;	/* month share */
+
+	/* get (wd - d), shifted to positive value, and multiply with
+	 * 3(mod 7). (Exact division, see to comment)
+	 * Note: 1) d <= 184 at this point.
+	 *	 2) 252 % 7 == 0, but 'wd' is off by one since we did
+	 *	    '--d' above, so we add just 251 here!
+	 */
+	c = u32mod7(3 * (251u + wd - d));
+	if (c > 3u)
+		return 0;
+
+	if ((m > 9u) && (++y >= 100u)) {/* undo base shift */
+		y -= 100u;
+		c = (c + 1) & 3u;
+	}
+	y += (c * 100u);		/* combine into 1st cycle */
+	y += (y < 300u) ? 2000 : 1600;	/* map to destination era */
+	return (int)y;
+}
+
+char *
+ntpcal_iso8601std(
+	char *		buf,
+	size_t		len,
+	TcCivilDate *	cdp
+	)
+{
+	if (!buf) {
+		LIB_GETBUF(buf);
+		len = LIB_BUFLENGTH;
+	}
+	if (len) {
+		len = snprintf(buf, len, "%04u-%02u-%02uT%02u:%02u:%02u",
+			       cdp->year, cdp->month, cdp->monthday,
+			       cdp->hour, cdp->minute, cdp->second);
+		if (len < 0)
+			*buf = '\0';
+	}
+	return buf;
+}
+
 /* -*-EOF-*- */
--- contrib/ntp/libntp/ntp_calgps.c.orig
+++ contrib/ntp/libntp/ntp_calgps.c
@@ -0,0 +1,634 @@
+/*
+ * ntp_calgps.c - calendar for GPS/GNSS based clocks
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * --------------------------------------------------------------------
+ *
+ * This module implements stuff often used with GPS/GNSS receivers
+ */
+
+#include <config.h>
+#include <sys/types.h>
+
+#include "ntp_types.h"
+#include "ntp_calendar.h"
+#include "ntp_calgps.h"
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+
+#include "ntp_fp.h"
+#include "ntpd.h"
+#include "vint64ops.h"
+
+/* ====================================================================
+ * misc. helpers -- might go elsewhere sometime?
+ * ====================================================================
+ */
+
+l_fp
+ntpfp_with_fudge(
+	l_fp	lfp,
+	double	ofs
+	)
+{
+	l_fp	fpo;
+	/* calculate 'lfp - ofs' as '(l_fp)(-ofs) + lfp': negating a
+	 * double is cheap, as it only flips one bit...
+	 */
+	ofs = -ofs;
+	DTOLFP(ofs, &fpo);
+	L_ADD(&fpo, &lfp);
+	return fpo;
+}
+
+
+/* ====================================================================
+ * GPS calendar functions
+ * ====================================================================
+ */
+
+/* --------------------------------------------------------------------
+ * normalization functions for day/time and week/time representations.
+ * Since we only use moderate offsets (leap second corrections and
+ * alike) it does not really pay off to do a floor-corrected division
+ * here.  We use compare/decrement/increment loops instead.
+ * --------------------------------------------------------------------
+ */
+static void
+_norm_ntp_datum(
+	TNtpDatum *	datum
+	)
+{
+	static const int32_t limit = SECSPERDAY;
+
+	if (datum->secs >= limit) {
+		do
+			++datum->days;
+		while ((datum->secs -= limit) >= limit);
+	} else if (datum->secs < 0) {
+		do
+			--datum->days;
+		while ((datum->secs += limit) < 0);
+	}
+}
+
+static void
+_norm_gps_datum(
+	TGpsDatum *	datum
+	)
+{
+	static const int32_t limit = 7 * SECSPERDAY;
+
+	if (datum->wsecs >= limit) {
+		do
+			++datum->weeks;
+		while ((datum->wsecs -= limit) >= limit);
+	} else if (datum->wsecs < 0) {
+		do
+			--datum->weeks;
+		while ((datum->wsecs += limit) < 0);
+	}
+}
+
+/* --------------------------------------------------------------------
+ * Add an offset to a day/time and week/time representation.
+ *
+ * !!Attention!! the offset should be small, compared to the time period
+ * (either a day or a week).
+ * --------------------------------------------------------------------
+ */
+void
+gpsntp_add_offset(
+	TNtpDatum *	datum,
+	l_fp		offset
+	)
+{
+	/* fraction can be added easily */
+	datum->frac += offset.l_uf;
+	datum->secs += (datum->frac < offset.l_uf);
+
+	/* avoid integer overflow on the seconds */
+	if (offset.l_ui >= INT32_MAX)
+		datum->secs -= (int32_t)~offset.l_ui + 1;
+	else
+		datum->secs += (int32_t)offset.l_ui;
+	_norm_ntp_datum(datum);
+}
+
+void
+gpscal_add_offset(
+	TGpsDatum *	datum,
+	l_fp		offset
+	)
+{
+	/* fraction can be added easily */
+	datum->frac  += offset.l_uf;
+	datum->wsecs += (datum->frac < offset.l_uf);
+
+
+	/* avoid integer overflow on the seconds */
+	if (offset.l_ui >= INT32_MAX)
+		datum->wsecs -= (int32_t)~offset.l_ui + 1;
+	else
+		datum->wsecs += (int32_t)offset.l_ui;
+	_norm_gps_datum(datum);
+}
+
+/* -------------------------------------------------------------------
+ *	API functions civil calendar and NTP datum
+ * -------------------------------------------------------------------
+ */
+
+static TNtpDatum
+_gpsntp_fix_gps_era(
+	TcNtpDatum * in
+	)
+{
+	/* force result in basedate era
+	 *
+	 * When calculating this directly in days, we have to execute a
+	 * real modulus calculation, since we're obviously not doing a
+	 * modulus by a power of 2. Executing this as true floor mod
+	 * needs some care and is done under explicit usage of one's
+	 * complement and masking to get mostly branchless code.
+	 */
+	static uint32_t const	clen = 7*1024;
+
+	uint32_t	base, days, sign;
+	TNtpDatum	out = *in;
+
+	/* Get base in NTP day scale. No overflows here. */
+	base = (basedate_get_gpsweek() + GPSNTP_WSHIFT) * 7
+	     - GPSNTP_DSHIFT;
+	days = out.days;
+
+	sign = (uint32_t)-(days < base);
+	days = sign ^ (days - base);
+	days %= clen;
+	days = base + (sign & clen) + (sign ^ days);
+
+	out.days = days;
+	return out;
+}
+
+TNtpDatum
+gpsntp_fix_gps_era(
+	TcNtpDatum * in
+	)
+{
+	TNtpDatum out = *in;
+	_norm_ntp_datum(&out);
+	return _gpsntp_fix_gps_era(&out);
+}
+
+/* ----------------------------------------------------------------- */
+static TNtpDatum
+_gpsntp_from_daytime(
+	TcCivilDate *	jd,
+	l_fp		fofs,
+	TcNtpDatum *	pivot,
+	int		warp
+	)
+{
+	static const int32_t shift = SECSPERDAY / 2;
+
+	TNtpDatum	retv;
+
+	/* set result based on pivot -- ops order is important here */
+	ZERO(retv);
+	retv.secs = ntpcal_date_to_daysec(jd);
+	gpsntp_add_offset(&retv, fofs);	/* result is normalized */
+	retv.days = pivot->days;
+
+	/* Manual periodic extension without division: */
+	if (pivot->secs < shift) {
+		int32_t lim = pivot->secs + shift;
+		retv.days -= (retv.secs > lim ||
+			      (retv.secs == lim && retv.frac >= pivot->frac));
+	} else {
+		int32_t lim = pivot->secs - shift;
+		retv.days += (retv.secs < lim ||
+			      (retv.secs == lim && retv.frac < pivot->frac));
+	}
+	return warp ? _gpsntp_fix_gps_era(&retv) : retv;
+}
+
+/* -----------------------------------------------------------------
+ * Given the time-of-day part of a civil datum and an additional
+ * (fractional) offset, calculate a full time stamp around a given pivot
+ * time so that the difference between the pivot and the resulting time
+ * stamp is less or equal to 12 hours absolute.
+ */
+TNtpDatum
+gpsntp_from_daytime2_ex(
+	TcCivilDate *	jd,
+	l_fp		fofs,
+	TcNtpDatum *	pivot,
+	int/*BOOL*/	warp
+	)
+{
+	TNtpDatum	dpiv = *pivot;
+	_norm_ntp_datum(&dpiv);
+	return _gpsntp_from_daytime(jd, fofs, &dpiv, warp);
+}
+
+/* -----------------------------------------------------------------
+ * This works similar to 'gpsntp_from_daytime1()' and actually even uses
+ * it, but the pivot is calculated from the pivot given as 'l_fp' in NTP
+ * time scale. This is in turn expanded around the current system time,
+ * and the resulting absolute pivot is then used to calculate the full
+ * NTP time stamp.
+ */
+TNtpDatum
+gpsntp_from_daytime1_ex(
+	TcCivilDate *	jd,
+	l_fp		fofs,
+	l_fp		pivot,
+	int/*BOOL*/	warp
+	)
+{
+	vint64		pvi64;
+	TNtpDatum	dpiv;
+	ntpcal_split	split;
+
+	pvi64 = ntpcal_ntp_to_ntp(pivot.l_ui, NULL);
+	split = ntpcal_daysplit(&pvi64);
+	dpiv.days = split.hi;
+	dpiv.secs = split.lo;
+	dpiv.frac = pivot.l_uf;
+	return _gpsntp_from_daytime(jd, fofs, &dpiv, warp);
+}
+
+/* -----------------------------------------------------------------
+ * Given a calendar date, zap it into a GPS time format and then convert
+ * that one into the NTP time scale.
+ */
+TNtpDatum
+gpsntp_from_calendar_ex(
+	TcCivilDate *	jd,
+	l_fp		fofs,
+	int/*BOOL*/	warp
+	)
+{
+	TGpsDatum	gps;
+	gps = gpscal_from_calendar_ex(jd, fofs, warp);
+	return gpsntp_from_gpscal_ex(&gps, FALSE);
+}
+
+/* -----------------------------------------------------------------
+ * create a civil calendar datum from a NTP date representation
+ */
+void
+gpsntp_to_calendar(
+	TCivilDate * cd,
+	TcNtpDatum * nd
+	)
+{
+	memset(cd, 0, sizeof(*cd));
+	ntpcal_rd_to_date(
+		cd,
+		nd->days + DAY_NTP_STARTS + ntpcal_daysec_to_date(
+			cd, nd->secs));
+}
+
+/* -----------------------------------------------------------------
+ * get day/tod representation from week/tow datum
+ */
+TNtpDatum
+gpsntp_from_gpscal_ex(
+	TcGpsDatum *	gd,
+    	int/*BOOL*/	warp
+	)
+{
+	TNtpDatum	retv;
+	vint64		ts64;
+	ntpcal_split	split;
+	TGpsDatum	date = *gd;
+
+	if (warp) {
+		uint32_t base = basedate_get_gpsweek() + GPSNTP_WSHIFT;
+		_norm_gps_datum(&date);
+		date.weeks = ((date.weeks - base) & 1023u) + base;
+	}
+
+	ts64  = ntpcal_weekjoin(date.weeks, date.wsecs);
+	ts64  = subv64u32(&ts64, (GPSNTP_DSHIFT * SECSPERDAY));
+	split = ntpcal_daysplit(&ts64);
+
+	retv.frac = gd->frac;
+	retv.secs = split.lo;
+	retv.days = split.hi;
+	return retv;
+}
+
+/* -----------------------------------------------------------------
+ * get LFP from ntp datum
+ */
+l_fp
+ntpfp_from_ntpdatum(
+	TcNtpDatum *	nd
+	)
+{
+	l_fp retv;
+
+	retv.l_uf = nd->frac;
+	retv.l_ui = nd->days * (uint32_t)SECSPERDAY
+	          + nd->secs;
+	return retv;
+}
+
+/* -------------------------------------------------------------------
+ *	API functions GPS week calendar
+ *
+ * Here we use a calendar base of 1899-12-31, so the NTP epoch has
+ * { 0, 86400.0 } in this representation.
+ * -------------------------------------------------------------------
+ */
+
+static TGpsDatum
+_gpscal_fix_gps_era(
+	TcGpsDatum * in
+	)
+{
+	/* force result in basedate era
+	 *
+	 * This is based on calculating the modulus to a power of two,
+	 * so signed integer overflow does not affect the result. Which
+	 * in turn makes for a very compact calculation...
+	 */
+	uint32_t	base, week;
+	TGpsDatum	out = *in;
+
+	week = out.weeks;
+	base = basedate_get_gpsweek() + GPSNTP_WSHIFT;
+	week = base + ((week - base) & (GPSWEEKS - 1));
+	out.weeks = week;
+	return out;
+}
+
+TGpsDatum
+gpscal_fix_gps_era(
+	TcGpsDatum * in
+	)
+{
+	TGpsDatum out = *in;
+	_norm_gps_datum(&out);
+	return _gpscal_fix_gps_era(&out);
+}
+
+/* -----------------------------------------------------------------
+ * Given a calendar date, zap it into a GPS time format and the do a
+ * proper era mapping in the GPS time scale, based on the GPS base date,
+ * if so requested.
+ *
+ * This function also augments the century if just a 2-digit year
+ * (0..99) is provided on input.
+ *
+ * This is a fail-safe against GPS receivers with an unknown starting
+ * point for their internal calendar calculation and therefore
+ * unpredictable (but reproducible!) rollover behavior. While there
+ * *are* receivers that create a full date in the proper way, many
+ * others just don't.  The overall damage is minimized by simply not
+ * trusting the era mapping of the receiver and doing the era assignment
+ * with a configurable base date *inside* ntpd.
+ */
+TGpsDatum
+gpscal_from_calendar_ex(
+	TcCivilDate *	jd,
+	l_fp		fofs,
+	int/*BOOL*/	warp
+	)
+{
+	/*  (-DAY_GPS_STARTS) (mod 7*1024) -- complement of cycle shift */
+	static const uint32_t s_compl_shift =
+	    (7 * 1024) - DAY_GPS_STARTS % (7 * 1024);
+
+	TGpsDatum	gps;
+	TCivilDate	cal;
+	int32_t		days, week;
+
+	/* if needed, convert from 2-digit year to full year
+	 * !!NOTE!! works only between 1980 and 2079!
+	 */
+	cal = *jd;
+	if (cal.year < 80)
+		cal.year += 2000;
+	else if (cal.year < 100)
+		cal.year += 1900;
+
+	/* get RDN from date, possibly adjusting the century */
+again:	if (cal.month && cal.monthday) {	/* use Y/M/D civil date */
+		days = ntpcal_date_to_rd(&cal);
+	} else {				/* using Y/DoY date */
+		days = ntpcal_year_to_ystart(cal.year)
+		     + (int32_t)cal.yearday
+		     - 1; /* both RDN and yearday start with '1'. */
+	}
+
+	/* Rebase to days after the GPS epoch. 'days' is positive here,
+	 * but it might be less than the GPS epoch start. Depending on
+	 * the input, we have to do different things to get the desired
+	 * result. (Since we want to remap the era anyway, we only have
+	 * to retain congruential identities....)
+	 */
+
+	if (days >= DAY_GPS_STARTS) {
+		/* simply shift to days since GPS epoch */
+		days -= DAY_GPS_STARTS;
+	} else if (jd->year < 100) {
+		/* Two-digit year on input: add another century and
+		 * retry.  This can happen only if the century expansion
+		 * yielded a date between 1980-01-01 and 1980-01-05,
+		 * both inclusive. We have at most one retry here.
+		 */
+		cal.year += 100;
+		goto again;
+	} else {
+		/* A very bad date before the GPS epoch. There's not
+		 * much we can do, except to add the complement of
+		 * DAY_GPS_STARTS % (7 * 1024) here, that is, use a
+		 * congruential identity: Add the complement instead of
+		 * subtracting the value gives a value with the same
+		 * modulus. But of course, now we MUST to go through a
+		 * cycle fix... because the date was obviously wrong!
+		 */
+		warp  = TRUE;
+		days += s_compl_shift;
+	}
+
+	/* Splitting to weeks is simple now: */
+	week  = days / 7;
+	days -= week * 7;
+
+	/* re-base on start of NTP with weeks mapped to 1024 weeks
+	 * starting with the GPS base day set in the calendar.
+	 */
+	gps.weeks = week + GPSNTP_WSHIFT;
+	gps.wsecs = days * SECSPERDAY + ntpcal_date_to_daysec(&cal);
+	gps.frac  = 0;
+	gpscal_add_offset(&gps, fofs);
+	return warp ? _gpscal_fix_gps_era(&gps) : gps;
+}
+
+/* -----------------------------------------------------------------
+ * get civil date from week/tow representation
+ */
+void
+gpscal_to_calendar(
+	TCivilDate * cd,
+	TcGpsDatum * wd
+	)
+{
+	TNtpDatum nd;
+
+	memset(cd, 0, sizeof(*cd));
+	nd = gpsntp_from_gpscal_ex(wd, FALSE);
+	gpsntp_to_calendar(cd, &nd);
+}
+
+/* -----------------------------------------------------------------
+ * Given the week and seconds in week, as well as the fraction/offset
+ * (which should/could include the leap seconds offset), unfold the
+ * weeks (which are assumed to have just 10 bits) into expanded weeks
+ * based on the GPS base date derived from the build date (default) or
+ * set by the configuration.
+ *
+ * !NOTE! This function takes RAW GPS weeks, aligned to the GPS start
+ * (1980-01-06) on input. The output weeks will be aligned to NTPD's
+ * week calendar start (1899-12-31)!
+ */
+TGpsDatum
+gpscal_from_gpsweek(
+	uint16_t	week,
+	int32_t		secs,
+	l_fp		fofs
+	)
+{
+	TGpsDatum retv;
+
+	retv.frac  = 0;
+	retv.wsecs = secs;
+	retv.weeks = week + GPSNTP_WSHIFT;
+	gpscal_add_offset(&retv, fofs);
+	return _gpscal_fix_gps_era(&retv);
+}
+
+/* -----------------------------------------------------------------
+ * internal work horse for time-of-week expansion
+ */
+static TGpsDatum
+_gpscal_from_weektime(
+	int32_t		wsecs,
+	l_fp    	fofs,
+	TcGpsDatum *	pivot
+	)
+{
+	static const int32_t shift = SECSPERWEEK / 2;
+
+	TGpsDatum	retv;
+
+	/* set result based on pivot -- ops order is important here */
+	ZERO(retv);
+	retv.wsecs = wsecs;
+	gpscal_add_offset(&retv, fofs);	/* result is normalized */
+	retv.weeks = pivot->weeks;
+
+	/* Manual periodic extension without division: */
+	if (pivot->wsecs < shift) {
+		int32_t lim = pivot->wsecs + shift;
+		retv.weeks -= (retv.wsecs > lim ||
+			       (retv.wsecs == lim && retv.frac >= pivot->frac));
+	} else {
+		int32_t lim = pivot->wsecs - shift;
+		retv.weeks += (retv.wsecs < lim ||
+			       (retv.wsecs == lim && retv.frac < pivot->frac));
+	}
+	return _gpscal_fix_gps_era(&retv);
+}
+
+/* -----------------------------------------------------------------
+ * expand a time-of-week around a pivot given as week datum
+ */
+TGpsDatum
+gpscal_from_weektime2(
+	int32_t		wsecs,
+	l_fp    	fofs,
+	TcGpsDatum *	pivot
+	)
+{
+	TGpsDatum wpiv = * pivot;
+	_norm_gps_datum(&wpiv);
+	return _gpscal_from_weektime(wsecs, fofs, &wpiv);
+}
+
+/* -----------------------------------------------------------------
+ * epand a time-of-week around an pivot given as LFP, which in turn
+ * is expanded around the current system time and then converted
+ * into a week datum.
+ */
+TGpsDatum
+gpscal_from_weektime1(
+	int32_t	wsecs,
+	l_fp    fofs,
+	l_fp    pivot
+	)
+{
+	vint64		pvi64;
+	TGpsDatum	wpiv;
+	ntpcal_split	split;
+
+	/* get 64-bit pivot in NTP epoch */
+	pvi64 = ntpcal_ntp_to_ntp(pivot.l_ui, NULL);
+
+	/* convert to weeks since 1899-12-31 and seconds in week */
+	pvi64 = addv64u32(&pvi64, (GPSNTP_DSHIFT * SECSPERDAY));
+	split = ntpcal_weeksplit(&pvi64);
+
+	wpiv.weeks = split.hi;
+	wpiv.wsecs = split.lo;
+	wpiv.frac  = pivot.l_uf;
+	return _gpscal_from_weektime(wsecs, fofs, &wpiv);
+}
+
+/* -----------------------------------------------------------------
+ * get week/tow representation from day/tod datum
+ */
+TGpsDatum
+gpscal_from_gpsntp(
+	TcNtpDatum *	gd
+	)
+{
+	TGpsDatum	retv;
+	vint64		ts64;
+	ntpcal_split	split;
+
+	ts64  = ntpcal_dayjoin(gd->days, gd->secs);
+	ts64  = addv64u32(&ts64, (GPSNTP_DSHIFT * SECSPERDAY));
+	split = ntpcal_weeksplit(&ts64);
+
+	retv.frac  = gd->frac;
+	retv.wsecs = split.lo;
+	retv.weeks = split.hi;
+	return retv;
+}
+
+/* -----------------------------------------------------------------
+ * convert week/tow to LFP stamp
+ */
+l_fp
+ntpfp_from_gpsdatum(
+	TcGpsDatum *	gd
+	)
+{
+	l_fp retv;
+
+	retv.l_uf = gd->frac;
+	retv.l_ui = gd->weeks * (uint32_t)SECSPERWEEK
+	          + (uint32_t)gd->wsecs
+	          - (uint32_t)SECSPERDAY * GPSNTP_DSHIFT;
+	return retv;
+}
+
+/* -*-EOF-*- */
--- contrib/ntp/libntp/recvbuff.c.orig
+++ contrib/ntp/libntp/recvbuff.c
@@ -226,7 +226,6 @@
 
 	LOCK();
 	
-#ifdef HAVE_SIGNALED_IO
 	/*
 	 * make sure there are free buffers when we
 	 * wander off to do lengthy packet processing with
@@ -241,7 +240,6 @@
 		 */
 		create_buffers(RECV_INC);
 	}
-#endif
 
 	/*
 	 * try to grab a full buffer
--- contrib/ntp/libntp/statestr.c.orig
+++ contrib/ntp/libntp/statestr.c
@@ -181,16 +181,23 @@
 	{ RES_IGNORE,			"ignore",	0 },
 	{ RES_DONTSERVE,		"noserve",	"serve" },
 	{ RES_DONTTRUST,		"notrust",	"trust" },
+	{ RES_VERSION,			"version",	0 },
+	{ RES_NOPEER,			"nopeer",	"peer" },
+	{ RES_NOEPEER,			"noepeer",	"epeer" },
+	{ RES_LIMITED,			"limited",	0 },
+
 	{ RES_NOQUERY,			"noquery",	"query" },
 	{ RES_NOMODIFY,			"nomodify",	0 },
-	{ RES_NOPEER,			"nopeer",	"peer" },
-	{ RES_NOEPEER,			"noepeer",	"epeer" },
 	{ RES_NOTRAP,			"notrap",	"trap" },
 	{ RES_LPTRAP,			"lptrap",	0 },
-	{ RES_LIMITED,			"limited",	0 },
-	{ RES_VERSION,			"version",	0 },
+
 	{ RES_KOD,			"kod",		0 },
+	{ RES_MSSNTP,			"mssntp",	0 },
 	{ RES_FLAKE,			"flake",	0 },
+	{ RES_NOMRULIST,		"nomrulist",	0 },
+
+	{ RES_SRVRSPFUZ,		"serverresponse fuzz",	0 },
+
 	/* not used with getcode(), no terminating entry needed */
 };
 
@@ -418,7 +425,7 @@
 
 const char *
 res_access_flags(
-	u_short af
+	u_int32 af
 	)
 {
 	return decode_bitflags(af, " ", res_access_bits,
--- contrib/ntp/libntp/systime.c.orig
+++ contrib/ntp/libntp/systime.c
@@ -619,12 +619,11 @@
 {
 #if SIZEOF_TIME_T > 4
 
-	struct timeval timetv, tvlast;
+	struct timeval  tvbase, tvlast;
 	struct timespec timets;
-	uint32_t	tdiff;
-
 	
-	timetv.tv_sec = basedate_get_erabase();
+	tvbase.tv_sec  = basedate_get_erabase();
+	tvbase.tv_usec = 0;
 	
 	/* ---> time-critical path starts ---> */
 
@@ -636,14 +635,10 @@
 		tvlast.tv_usec -= 1000000;
 		tvlast.tv_sec  += 1;
 	}
-	timetv.tv_usec = tvlast.tv_usec;
 
-	tdiff = (uint32_t)(tvlast.tv_sec & UINT32_MAX) -
-	        (uint32_t)(timetv.tv_sec & UINT32_MAX);
-	timetv.tv_sec += tdiff;
-	if (timetv.tv_sec != tvlast.tv_sec) {
+	if (tvbase.tv_sec > tvlast.tv_sec) {
 		/* now set new system time */
-		if (ntp_set_tod(&timetv, NULL) != 0) {
+		if (ntp_set_tod(&tvbase, NULL) != 0) {
 			msyslog(LOG_ERR, "clamp-systime: %m");
 			return FALSE;
 		}
@@ -650,7 +645,7 @@
 	} else {
 		msyslog(LOG_INFO,
 			"clamp-systime: clock (%s) in allowed range",
-			tv_fmt_libbuf(&timetv));
+			tv_fmt_libbuf(&tvlast));
 		return FALSE;
 	}
 
@@ -657,7 +652,7 @@
 	/* <--- time-critical path ended with 'ntp_set_tod()' <--- */
 
 	sys_residual = 0;
-	lamport_violated = (timetv.tv_sec < tvlast.tv_sec);
+	lamport_violated = (tvbase.tv_sec < tvlast.tv_sec);
 	if (step_callback)
 		(*step_callback)();
 
@@ -668,15 +663,16 @@
 	_clear_adjtime();
 #   endif
 
-	update_uwtmp(timetv, tvlast);
+	update_uwtmp(tvbase, tvlast);
 	msyslog(LOG_WARNING,
 		"clamp-systime: clock stepped from %s to %s!",
-		tv_fmt_libbuf(&tvlast), tv_fmt_libbuf(&timetv));
+		tv_fmt_libbuf(&tvlast), tv_fmt_libbuf(&tvbase));
 	return TRUE;
 		
 #else
 
-	return 0;
+	return FALSE;
+	
 #endif
 }
 
--- contrib/ntp/libntp/timespecops.c.orig
+++ contrib/ntp/libntp/timespecops.c
@@ -0,0 +1,233 @@
+/*
+ * timespecops.c -- calculations on 'struct timespec' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "ntp.h"
+#include "timetoa.h"
+#include "timespecops.h"
+
+
+/* nanoseconds per second */
+#define NANOSECONDS 1000000000
+
+/* conversion between l_fp fractions and nanoseconds */
+#ifdef HAVE_U_INT64
+# define FTOTVN(tsf)						\
+	((int32)						\
+	 (((u_int64)(tsf) * NANOSECONDS + 0x80000000) >> 32))
+# define TVNTOF(tvu)						\
+	((u_int32)						\
+	 ((((u_int64)(tvu) << 32) + NANOSECONDS / 2) /		\
+	  NANOSECONDS))
+#else
+# define NSECFRAC	(FRAC / NANOSECONDS)
+# define FTOTVN(tsf)						\
+	((int32)((tsf) / NSECFRAC + 0.5))
+# define TVNTOF(tvu)						\
+	((u_int32)((tvu) * NSECFRAC + 0.5))
+#endif
+
+
+
+/* make sure nanoseconds are in nominal range */
+struct timespec
+normalize_tspec(
+	struct timespec x
+	)
+{
+#if SIZEOF_LONG > 4
+	long	z;
+
+	/* 
+	 * tv_nsec is of type 'long', and on a 64-bit machine using only
+	 * loops becomes prohibitive once the upper 32 bits get
+	 * involved. On the other hand, division by constant should be
+	 * fast enough; so we do a division of the nanoseconds in that
+	 * case. The floor adjustment step follows with the standard
+	 * normalisation loops. And labs() is intentionally not used
+	 * here: it has implementation-defined behaviour when applied
+	 * to LONG_MIN.
+	 */
+	if (x.tv_nsec < -3l * NANOSECONDS ||
+	    x.tv_nsec > 3l * NANOSECONDS) {
+		z = x.tv_nsec / NANOSECONDS;
+		x.tv_nsec -= z * NANOSECONDS;
+		x.tv_sec += z;
+	}
+#endif
+	/* since 10**9 is close to 2**32, we don't divide but do a
+	 * normalisation in a loop; this takes 3 steps max, and should
+	 * outperform a division even if the mul-by-inverse trick is
+	 * employed. */
+	if (x.tv_nsec < 0)
+		do {
+			x.tv_nsec += NANOSECONDS;
+			x.tv_sec--;
+		} while (x.tv_nsec < 0);
+	else if (x.tv_nsec >= NANOSECONDS)
+		do {
+			x.tv_nsec -= NANOSECONDS;
+			x.tv_sec++;
+		} while (x.tv_nsec >= NANOSECONDS);
+
+	return x;
+}
+
+/* x = abs(a) */
+struct timespec
+abs_tspec(
+	struct timespec	a
+	)
+{
+	struct timespec	c;
+
+	c = normalize_tspec(a);
+	if (c.tv_sec < 0) {
+		if (c.tv_nsec != 0) {
+			c.tv_sec = -c.tv_sec - 1;
+			c.tv_nsec = NANOSECONDS - c.tv_nsec;
+		} else {
+			c.tv_sec = -c.tv_sec;
+		}
+	}
+
+	return c;
+}
+
+/*
+ * compare previously-normalised a and b
+ * return 1 / 0 / -1 if a < / == / > b
+ */
+int
+cmp_tspec(
+	struct timespec a,
+	struct timespec b
+	)
+{
+	int r;
+
+	r = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec);
+	if (0 == r)
+		r = (a.tv_nsec > b.tv_nsec) -
+		    (a.tv_nsec < b.tv_nsec);
+	
+	return r;
+}
+
+/*
+ * test previously-normalised a
+ * return 1 / 0 / -1 if a < / == / > 0
+ */
+int
+test_tspec(
+	struct timespec	a
+	)
+{
+	int		r;
+
+	r = (a.tv_sec > 0) - (a.tv_sec < 0);
+	if (r == 0)
+		r = (a.tv_nsec > 0);
+	
+	return r;
+}
+
+/*
+ *  convert to l_fp type, relative and absolute
+ */
+
+/* convert from timespec duration to l_fp duration */
+l_fp
+tspec_intv_to_lfp(
+	struct timespec	x
+	)
+{
+	struct timespec	v;
+	l_fp		y;
+	
+	v = normalize_tspec(x);
+	y.l_uf = TVNTOF(v.tv_nsec);
+	y.l_i = (int32)v.tv_sec;
+
+	return y;
+}
+
+/* convert from l_fp type, relative signed/unsigned and absolute */
+struct timespec
+lfp_intv_to_tspec(
+	l_fp		x
+	)
+{
+	struct timespec out;
+	l_fp		absx;
+	int		neg;
+	
+	neg = L_ISNEG(&x);
+	absx = x;
+	if (neg) {
+		L_NEG(&absx);	
+	}
+	out.tv_nsec = FTOTVN(absx.l_uf);
+	out.tv_sec = absx.l_i;
+	if (neg) {
+		out.tv_sec = -out.tv_sec;
+		out.tv_nsec = -out.tv_nsec;
+		out = normalize_tspec(out);
+	}
+
+	return out;
+}
+
+struct timespec
+lfp_uintv_to_tspec(
+	l_fp		x
+	)
+{
+	struct timespec	out;
+	
+	out.tv_nsec = FTOTVN(x.l_uf);
+	out.tv_sec = x.l_ui;
+
+	return out;
+}
+
+/*
+ * absolute (timestamp) conversion. Input is time in NTP epoch, output
+ * is in UN*X epoch. The NTP time stamp will be expanded around the
+ * pivot time *p or the current time, if p is NULL.
+ */
+struct timespec
+lfp_stamp_to_tspec(
+	l_fp		x,
+	const time_t *	p
+	)
+{
+	struct timespec	out;
+	vint64		sec;
+
+	sec = ntpcal_ntp_to_time(x.l_ui, p);
+	out.tv_nsec = FTOTVN(x.l_uf);
+
+	/* copying a vint64 to a time_t needs some care... */
+#if SIZEOF_TIME_T <= 4
+	out.tv_sec = (time_t)sec.d_s.lo;
+#elif defined(HAVE_INT64)
+	out.tv_sec = (time_t)sec.q_s;
+#else
+	out.tv_sec = ((time_t)sec.d_s.hi << 32) | sec.d_s.lo;
+#endif
+	
+	return out;
+}
+
+/* -*-EOF-*- */
--- contrib/ntp/libntp/timexsup.c.orig
+++ contrib/ntp/libntp/timexsup.c
@@ -0,0 +1,83 @@
+/*
+ * timexsup.c - 'struct timex' support functions
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ */
+
+#include "config.h"
+#include "timexsup.h"
+#include <limits.h>
+#include <math.h>
+
+#ifdef HAVE_SYS_TIMEX_H
+# include <sys/timex.h>
+#endif
+
+#if defined(MOD_NANO) != defined(STA_NANO)
+# warning inconsistent definitions of MOD_NANO vs STA_NANO
+#endif
+
+static long
+clamp_rounded(
+	double dval
+	)
+{
+	/* round */
+	dval = floor(dval + 0.5);
+
+	/* clamp / saturate */
+	if (dval >= LONG_MAX)
+		return LONG_MAX;
+	if (dval <= LONG_MIN)
+		return LONG_MIN;
+	return (long)dval;
+	
+}
+double
+dbl_from_var_long(
+	long	lval,
+	int	status
+	)
+{
+#ifdef STA_NANO
+	if (status & STA_NANO)
+		return (double)lval * 1e-9;
+#else
+	(void)status;
+#endif
+	return (double)lval * 1e-6;
+}
+
+double
+dbl_from_usec_long(
+	long	lval
+	)
+{
+	return (double)lval * 1e-6;
+}
+
+long
+var_long_from_dbl(
+	double		dval,
+	unsigned int *	modes
+	)
+{
+#ifdef MOD_NANO
+	*modes |= MOD_NANO;
+	dval *= 1e+9;
+#else
+	(void)modes;
+	dval *= 1e+6;
+#endif
+	return clamp_rounded(dval);
+}
+
+long
+usec_long_from_dbl(
+	double	dval
+	)
+{
+	return clamp_rounded(dval * 1e+6);
+}
+
--- contrib/ntp/libparse/Makefile.am.orig
+++ contrib/ntp/libparse/Makefile.am
@@ -164,9 +164,11 @@
 
 parsesolaris.o: sys/systm.h
 
+# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
+# ones from 'systm.h'.
 sys/systm.h:
 	-mkdir sys
-	sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+	sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
 
 ## check-libparse is invoked by ntpd/Makefile.am
 check-libparse: $(noinst_LIBRARIES)
--- contrib/ntp/libparse/Makefile.in.orig
+++ contrib/ntp/libparse/Makefile.in
@@ -1000,9 +1000,11 @@
 
 parsesolaris.o: sys/systm.h
 
+# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the
+# ones from 'systm.h'.
 sys/systm.h:
 	-mkdir sys
-	sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+	sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
 
 check-libparse: $(noinst_LIBRARIES)
 	@: do-nothing action to avoid default SCCS get
--- contrib/ntp/libparse/clk_rawdcf.c.orig
+++ contrib/ntp/libparse/clk_rawdcf.c
@@ -220,6 +220,58 @@
 	return psum;
 }
 
+static int/*BOOL*/
+zeller_expand(
+	clocktime_t     *clock_time,
+	unsigned int	wd
+	)
+{
+        unsigned int  y = (unsigned int)clock_time->year;
+        unsigned int  m = (unsigned int)clock_time->month - 1u;
+        unsigned int  d = (unsigned int)clock_time->day - 1u;
+	unsigned int  c;
+
+	/* Check basic constraints first. */
+        if ((y >= 100u) || (m >= 12u) || (d >= 31u) || (--wd >= 7u))
+		return FALSE;
+
+	/* Get weekday of date in 1st century by a variation on Zeller's
+	 * congruence. All operands are non-negative, and the month
+	 * formula is adjusted to use a divider of 32, so we can do a
+	 * shift instead of a 'true' division:
+	 */
+	if ((m += 10u) >= 12u)		/* shift base to 0000-03-01 */
+		m -= 12u;
+	else if (--y >= 100u)
+		y += 100;
+	d += y + (y >> 2) + 2u;		/* year-related share */
+	d += (m * 83u + 16u) >> 5;	/* month-related share */
+
+	/* The next step combines the exact division by modular inverse
+	 * with the (mod 7) step in such way that no true division and
+	 * only one multiplication is needed. The multiplier is
+	 *      M <- ceil((3*8)/7 * 2**29)
+	 * and combines multiplication by invmod(5, 7) -> 3 and modulus
+	 * by 7 transformation to (mod 8) in one step.
+	 *   Note that 252 == 0 (mod 7) and that 'd' is less than 185,
+	 * so the number to invert and reduce is strictly positive. In
+	 * the end, 'c' is number of centuries since start of a great
+	 * cycle and must be in [0..3] or we had bad input.
+	 */
+	c = (((252u + wd - d) * 0x6db6db6eU) >> 29) & 7u;
+	if (c >= 4)
+		return FALSE;	
+	/* undo calendar base shift now */
+	if ((m > 9u) && (++y >= 100u)) {
+		y -= 100u;
+		c = (c + 1u) & 3u;
+	}
+	/* combine year with centuries & map to [1970..2369] */
+	y += (c * 100u);
+	clock_time->year = (int)y + ((y < 370u) ? 2000 : 1600);
+	return TRUE;
+}
+
 static u_long
 convert_rawdcf(
 	       unsigned char   *buffer,
@@ -288,6 +340,9 @@
 		clock_time->year   = ext_bf(buffer, DCF_Y10, dcfprm->zerobits);
 		clock_time->year   = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1, dcfprm->zerobits);
 
+		if (!zeller_expand(clock_time, ext_bf(buffer, DCF_DW, dcfprm->zerobits)))
+		    return CVT_FAIL|CVT_BADFMT;
+
 		switch (ext_bf(buffer, DCF_Z, dcfprm->zerobits))
 		{
 		    case DCF_Z_MET:
--- contrib/ntp/ntpd/Makefile.am.orig
+++ contrib/ntp/ntpd/Makefile.am
@@ -25,7 +25,7 @@
 if NTP_CROSSCOMPILE
 CHECK_SAVECONFIG=
 else
-CHECK_SAVECONFIG= check-saveconfig
+CHECK_SAVECONFIG= check-saveconfig check-pslsaveconfig
 endif
 else !SAVECONFIG_ENABLED
 CHECK_SAVECONFIG=
@@ -110,9 +110,20 @@
 	$(NULL)
 
 CLEANFILES =			\
+	check-psl0		\
+	check-psl1		\
+	check-psl2		\
+	check-pslsaveconfig	\
 	check-saveconfig	\
 	compsave.conf		\
+	compsave.conf+		\
 	k-g-u-submake		\
+	psl0save.conf		\
+	psl0save.conf+		\
+	psl1save.conf		\
+	psl1save.conf+		\
+	psl2save.conf		\
+	psl2save.conf+		\
 	$(EXTRA_PROGRAMS)	\
 	$(NULL)
 
@@ -147,6 +158,9 @@
 	ntpd.html		\
 	ntpd.texi		\
 	ntpdbase-opts.def	\
+	psl0.conf		\
+	psl1.conf		\
+	psl2.conf		\
 	refclock_msfees.c	\
 	$(B_S_DIST)		\
 	$(NULL)
@@ -345,13 +359,13 @@
 $(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
 	$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
 
-$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(srcdir)/invoke-ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
 
-$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(srcdir)/invoke-ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.keys.html ntp.keys.texi || true )
 
-$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(srcdir)/invoke-ntpd.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpd.html ntpd.texi || true )
 
 ###
@@ -413,13 +427,41 @@
 
 $(PROGRAMS): $(LDADD)
 
-compsave.conf: ntpd complete.conf
-	./ntpd --configfile complete.conf --saveconfigquit $@
-
 check-saveconfig: complete.conf compsave.conf
 	-diff -u complete.conf compsave.conf
 	cmp complete.conf compsave.conf && echo stamp > $@
 
+compsave.conf: ntpd complete.conf
+	./ntpd --configfile complete.conf --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-pslsaveconfig: check-psl0 check-psl1 check-psl2
+	echo stamp > $@
+
+check-psl0: psl0.conf psl0save.conf
+	-diff -u $< psl0save.conf
+	cmp $< psl0save.conf && echo stamp > $@
+
+psl0save.conf: psl0.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-psl1: psl1.conf psl1save.conf
+	-diff -u $< psl1save.conf
+	cmp $< psl1save.conf && echo stamp > $@
+
+psl1save.conf: psl1.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-psl2: psl2.conf psl2save.conf
+	-diff -u $< psl2save.conf
+	cmp $< psl2save.conf && echo stamp > $@
+
+psl2save.conf: psl2.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
 ../libntp/libntpsim.a:
 	cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntpsim.a
 
--- contrib/ntp/ntpd/Makefile.in.orig
+++ contrib/ntp/ntpd/Makefile.in
@@ -615,7 +615,7 @@
 # LDADD might need RESLIB and ADJLIB.
 LDADD = version.o libntpd.a $(LIBPARSE)
 AM_YFLAGS = -d -t -r all
-@NTP_CROSSCOMPILE_FALSE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = check-saveconfig
+@NTP_CROSSCOMPILE_FALSE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = check-saveconfig check-pslsaveconfig
 @NTP_CROSSCOMPILE_TRUE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = 
 @SAVECONFIG_ENABLED_FALSE@CHECK_SAVECONFIG = 
 @VPATH_HACK_FALSE@VPHACK = 
@@ -667,8 +667,11 @@
 	$(man_MANS)		\
 	$(NULL)
 
-CLEANFILES = check-saveconfig compsave.conf k-g-u-submake \
-	$(EXTRA_PROGRAMS) $(NULL) check-libopts check-libntp .deps-ver
+CLEANFILES = check-psl0 check-psl1 check-psl2 check-pslsaveconfig \
+	check-saveconfig compsave.conf compsave.conf+ k-g-u-submake \
+	psl0save.conf psl0save.conf+ psl1save.conf psl1save.conf+ \
+	psl2save.conf psl2save.conf+ $(EXTRA_PROGRAMS) $(NULL) \
+	check-libopts check-libntp .deps-ver
 EXTRA_DIST = \
 	complete.conf.in	\
 	invoke-ntp.conf.menu	\
@@ -700,6 +703,9 @@
 	ntpd.html		\
 	ntpd.texi		\
 	ntpdbase-opts.def	\
+	psl0.conf		\
+	psl1.conf		\
+	psl2.conf		\
 	refclock_msfees.c	\
 	$(B_S_DIST)		\
 	$(NULL)
@@ -1743,13 +1749,13 @@
 $(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
 	$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
 
-$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(srcdir)/invoke-ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
 
-$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(srcdir)/invoke-ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.keys.html ntp.keys.texi || true )
 
-$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(srcdir)/invoke-ntpd.texi $(top_srcdir)/sntp/include/version.texi
 	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpd.html ntpd.texi || true )
 
 ###
@@ -1811,13 +1817,41 @@
 
 $(PROGRAMS): $(LDADD)
 
-compsave.conf: ntpd complete.conf
-	./ntpd --configfile complete.conf --saveconfigquit $@
-
 check-saveconfig: complete.conf compsave.conf
 	-diff -u complete.conf compsave.conf
 	cmp complete.conf compsave.conf && echo stamp > $@
 
+compsave.conf: ntpd complete.conf
+	./ntpd --configfile complete.conf --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-pslsaveconfig: check-psl0 check-psl1 check-psl2
+	echo stamp > $@
+
+check-psl0: psl0.conf psl0save.conf
+	-diff -u $< psl0save.conf
+	cmp $< psl0save.conf && echo stamp > $@
+
+psl0save.conf: psl0.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-psl1: psl1.conf psl1save.conf
+	-diff -u $< psl1save.conf
+	cmp $< psl1save.conf && echo stamp > $@
+
+psl1save.conf: psl1.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
+check-psl2: psl2.conf psl2save.conf
+	-diff -u $< psl2save.conf
+	cmp $< psl2save.conf && echo stamp > $@
+
+psl2save.conf: psl2.conf ntpd
+	./ntpd --configfile $< --saveconfigquit $@+
+	grep -v '^#' $@+ > $@
+
 ../libntp/libntpsim.a:
 	cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntpsim.a
 
--- contrib/ntp/ntpd/cmd_args.c.orig
+++ contrib/ntp/ntpd/cmd_args.c
@@ -71,7 +71,7 @@
 	}
 
 	if (HAVE_OPT( DRIFTFILE ))
-		stats_config(STATS_FREQ_FILE, OPT_ARG( DRIFTFILE ));
+	    stats_config(STATS_FREQ_FILE, OPT_ARG( DRIFTFILE ), 0);
 
 	if (HAVE_OPT( PANICGATE ))
 		allow_panic = TRUE;
@@ -90,7 +90,7 @@
 		getauthkeys(OPT_ARG( KEYFILE ));
 
 	if (HAVE_OPT( PIDFILE ))
-		stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE ));
+	    stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE ), 0);
 
 	if (HAVE_OPT( QUIT ))
 		mode_ntpdate = TRUE;
@@ -110,7 +110,7 @@
 		} while (0);
 
 	if (HAVE_OPT( STATSDIR ))
-		stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR ));
+	    stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR ), 0);
 
 	if (HAVE_OPT( TRUSTEDKEY )) {
 		int		ct = STACKCT_OPT(  TRUSTEDKEY );
--- contrib/ntp/ntpd/complete.conf.in.orig
+++ contrib/ntp/ntpd/complete.conf.in
@@ -1,7 +1,8 @@
 saveconfigdir "/etc/ntp/conf"
-driftfile "/etc/ntp.drift" 1e-7
+driftfile "/etc/ntp.drift"
 logfile "/var/log/ntp.log"
-leapfile "/etc/ntp.leapseconds"
+leapfile "/etc/ntp.leapseconds" ignorehash
+leapfile "/etc/ntp.leapseconds" checkhash
 @HAVE_LEAPSMEARINTERVAL@
 nonvolatile 1e-7
 ident "udent"
@@ -31,7 +32,7 @@
 tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepout 900 tick 0.01
 broadcastclient
 server 127.127.1.0 mode 4294967295 prefer true
-fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd
+fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd minjitter 0.2
 pool 0.north-america.pool.ntp.org. iburst preempt
 server 1.north-america.pool.ntp.org. iburst
 server -4 2.north-america.pool.ntp.org. minpoll 6 maxpoll 10 iburst
@@ -38,7 +39,7 @@
 server -6 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst
 peer -6 davehart.broker.freenet6.net. ident "autokey-group" xleave autokey
 peer -4 192.168.192.168 key 1 noselect
-server [fe80::123%1]
+server [fe80::123%1] xmtnonce
 broadcast 192.168.192.255
 manycastclient 224.0.1.1
 manycastclient ff05::101
@@ -46,6 +47,7 @@
 multicastclient 224.0.1.1 ff05::101
 mru maxage 64 mindepth 600 initalloc 600 initmem 16 incalloc 99 incmem 4 maxdepth 1024 maxmem 4096
 discard minimum 1 average 3 monitor 3000
+pollskewlist 3 1|2 4 3|4 default 6|7
 restrict default ippeerlimit -1
 restrict default ippeerlimit 0 nomodify limited kod noserve nomrulist
 restrict source ippeerlimit 1
@@ -53,6 +55,7 @@
 restrict trusted.host.name.example.com. ippeerlimit -1 nomodify
 restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff] ippeerlimit -1
 restrict 127.0.0.1 mask 255.255.255.255 ippeerlimit -1
+restrict 127.0.0.2 ippeerlimit -1 serverresponse fuzz
 restrict ::1 ippeerlimit -1
 interface drop ipv6
 interface ignore ipv4
--- contrib/ntp/ntpd/invoke-ntp.conf.texi.orig
+++ contrib/ntp/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntp.conf.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:56:39 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:40:57 PM by AutoGen 5.18.5
 # From the definitions    ntp.conf.def
 # and the template file   agtexi-file.tpl
 @end ignore
@@ -134,8 +134,8 @@
 See IPv6 references for the
 equivalent classes for that address family.
 @table @asis
-@item @code{pool} @kbd{address} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]}
-@item @code{server} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{true}]}
+@item @code{pool} @kbd{address} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{xmtnonce}]}
+@item @code{server} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{true}]} @code{[@code{xmtnonce}]}
 @item @code{peer} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{true}]} @code{[@code{xleave}]}
 @item @code{broadcast} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{ttl} @kbd{ttl}]} @code{[@code{xleave}]}
 @item @code{manycastclient} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{ttl} @kbd{ttl}]}
@@ -305,9 +305,6 @@
 The server is discarded by the selection algroithm.
 @item @code{preempt}
 Says the association can be preempted.
-@item @code{true}
-Marks the server as a truechimer.
-Use this option only for testing.
 @item @code{prefer}
 Marks the server as preferred.
 All other things being equal,
@@ -321,7 +318,8 @@
 @file{/usr/share/doc/ntp})
 for further information.
 @item @code{true}
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 @emph{only}
 be used while testing an association.
@@ -349,6 +347,13 @@
 and
 @code{broadcast}
 modes only, this flag enables interleave mode.
+@item @code{xmtnonce}
+Valid only for
+@code{server}
+and
+@code{pool}
+modes, this flag puts a random number in the packet's transmit timestamp.
+
 @end table
 @subsubsection Auxiliary Commands
 @table @asis
@@ -1622,6 +1627,10 @@
 @code{ntpport}
 is considered more specific and
 is sorted later in the list.
+@item @code{serverresponse fuzz}
+When reponding to server requests,
+fuzz the low order bits of the
+@code{reftime}.
 @item @code{version}
 Deny packets that do not match the current NTP version.
 @end table
@@ -2766,6 +2775,21 @@
 one telephone number used to dial the telephone JJY service.
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
+@item @code{pollskewlist} @code{[@kbd{poll} @kbd{value} | @kbd{value}]} @kbd{...} @code{[@code{default} @kbd{value} | @kbd{value}]}
+Enable skewing of our poll requests to our servers.
+@kbd{poll}
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
 @item @code{reset} @code{[@code{allpeers}]} @code{[@code{auth}]} @code{[@code{ctl}]} @code{[@code{io}]} @code{[@code{mem}]} @code{[@code{sys}]} @code{[@code{timer}]}
 Reset one or more groups of counters maintained by
 @code{ntpd}
--- contrib/ntp/ntpd/invoke-ntp.keys.texi.orig
+++ contrib/ntp/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntp.keys.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:56:41 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:40:59 PM by AutoGen 5.18.5
 # From the definitions    ntp.keys.def
 # and the template file   agtexi-file.tpl
 @end ignore
--- contrib/ntp/ntpd/invoke-ntpd.texi.orig
+++ contrib/ntp/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntpd.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:56:42 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:00 PM by AutoGen 5.18.5
 # From the definitions    ntpd-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -142,7 +142,7 @@
 
 @exampleindent 0
 @example
-ntpd - NTP daemon program - Ver. 4.2.8p13
+ntpd - NTP daemon program - Ver. 4.2.8p14
 Usage:  ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
                 [ <server1> ... <serverN> ]
   Flg Arg Option-Name    Description
--- contrib/ntp/ntpd/keyword-gen-utd.orig
+++ contrib/ntp/ntpd/keyword-gen-utd
@@ -1 +1 @@
- *	 Generated 2018-01-14 03:53:33 UTC	  diff_ignore_line
+ *	 Generated 2020-02-13 08:56:28 UTC	  diff_ignore_line
--- contrib/ntp/ntpd/keyword-gen.c.orig
+++ contrib/ntp/ntpd/keyword-gen.c
@@ -43,6 +43,7 @@
 { "broadcast",		T_Broadcast,		FOLLBY_STRING },
 { "broadcastclient",	T_Broadcastclient,	FOLLBY_TOKEN },
 { "broadcastdelay",	T_Broadcastdelay,	FOLLBY_TOKEN },
+{ "checkhash",		T_Checkhash,		FOLLBY_TOKEN },
 { "ctl",		T_Ctl,			FOLLBY_TOKEN },
 { "disable",		T_Disable,		FOLLBY_TOKEN },
 { "driftfile",		T_Driftfile,		FOLLBY_STRING },
@@ -51,6 +52,7 @@
 { "end",		T_End,			FOLLBY_TOKEN },
 { "filegen",		T_Filegen,		FOLLBY_TOKEN },
 { "fudge",		T_Fudge,		FOLLBY_STRING },
+{ "ignorehash",		T_Ignorehash,		FOLLBY_TOKEN },
 { "io",			T_Io,			FOLLBY_TOKEN },
 { "includefile",	T_Includefile,		FOLLBY_STRING },
 { "leapfile",		T_Leapfile,		FOLLBY_STRING },
@@ -64,6 +66,7 @@
 { "peer",		T_Peer,			FOLLBY_STRING },
 { "phone",		T_Phone,		FOLLBY_STRINGS_TO_EOC },
 { "pidfile",		T_Pidfile,		FOLLBY_STRING },
+{ "pollskewlist",	T_PollSkewList,		FOLLBY_TOKEN },
 { "pool",		T_Pool,			FOLLBY_STRING },
 { "discard",		T_Discard,		FOLLBY_TOKEN },
 { "reset",		T_Reset,		FOLLBY_TOKEN },
@@ -70,6 +73,9 @@
 { "restrict",		T_Restrict,		FOLLBY_TOKEN },
 { "rlimit",		T_Rlimit,		FOLLBY_TOKEN },
 { "server",		T_Server,		FOLLBY_STRING },
+{ "serverresponse",	T_Serverresponse,	FOLLBY_TOKEN },
+{ "fuzz",		T_Fuzz,			FOLLBY_TOKEN },
+{ "poll",		T_Poll,			FOLLBY_TOKEN },
 { "setvar",		T_Setvar,		FOLLBY_STRING },
 { "statistics",		T_Statistics,		FOLLBY_TOKEN },
 { "statsdir",		T_Statsdir,		FOLLBY_STRING },
@@ -81,6 +87,7 @@
 { "trap",		T_Trap,			FOLLBY_STRING },
 { "unconfig",		T_Unconfig,		FOLLBY_STRING },
 { "unpeer",		T_Unpeer,		FOLLBY_STRING },
+{ "xmtnonce",		T_Xmtnonce,		FOLLBY_TOKEN },
 /* authentication_command */
 { "controlkey",		T_ControlKey,		FOLLBY_TOKEN },
 { "crypto",		T_Crypto,		FOLLBY_TOKEN },
@@ -199,6 +206,7 @@
 { "stratum",		T_Stratum,		FOLLBY_TOKEN },
 { "time1",		T_Time1,		FOLLBY_TOKEN },
 { "time2",		T_Time2,		FOLLBY_TOKEN },
+{ "minjitter",		T_Minjitter,		FOLLBY_TOKEN },
 /* system_option */
 { "auth",		T_Auth,			FOLLBY_TOKEN },
 { "bclient",		T_Bclient,		FOLLBY_TOKEN },
--- contrib/ntp/ntpd/ntp.conf.5man.orig
+++ contrib/ntp/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp.conf 5man "20 Feb 2019" "4.2.8p13" "File Formats"
+.TH ntp.conf 5man "03 Mar 2020" "4.2.8p14" "File Formats"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:02 PM by AutoGen 5.18.5
 .\" From the definitions ntp.conf.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -161,9 +161,9 @@
 See IPv6 references for the
 equivalent classes for that address family.
 .TP 7
-.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]xmtnonce\f[]]
 .TP 7
-.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]]
+.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]] [\f\*[B-Font]xmtnonce\f[]]
 .TP 7
 .NOP \f\*[B-Font]peer\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]] [\f\*[B-Font]xleave\f[]]
 .TP 7
@@ -352,10 +352,6 @@
 .NOP \f\*[B-Font]preempt\f[]
 Says the association can be preempted.
 .TP 7
-.NOP \f\*[B-Font]true\f[]
-Marks the server as a truechimer.
-Use this option only for testing.
-.TP 7
 .NOP \f\*[B-Font]prefer\f[]
 Marks the server as preferred.
 All other things being equal,
@@ -370,7 +366,8 @@
 for further information.
 .TP 7
 .NOP \f\*[B-Font]true\f[]
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 \fIonly\f[]
 be used while testing an association.
@@ -401,6 +398,13 @@
 and
 \f\*[B-Font]broadcast\f[]
 modes only, this flag enables interleave mode.
+.TP 7
+.NOP \f\*[B-Font]xmtnonce\f[]
+Valid only for
+\f\*[B-Font]server\f[]
+and
+\f\*[B-Font]pool\f[]
+modes, this flag puts a random number in the packet's transmit timestamp.
 .PP
 .SS Auxiliary Commands
 .TP 7
@@ -1838,6 +1842,11 @@
 is considered more specific and
 is sorted later in the list.
 .TP 7
+.NOP \f\*[B-Font]serverresponse fuzz\f[]
+When reponding to server requests,
+fuzz the low order bits of the
+\f\*[B-Font]reftime\f[].
+.TP 7
 .NOP \f\*[B-Font]version\f[]
 Deny packets that do not match the current NTP version.
 .RE
@@ -3092,6 +3101,22 @@
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
 .TP 7
+.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]]
+Enable skewing of our poll requests to our servers.
+\f\*[I-Font]poll\f[]
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
+.TP 7
 .NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
 Reset one or more groups of counters maintained by
 \f\*[B-Font]ntpd\f[]
@@ -3424,7 +3449,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The syntax checking is not picky; some combinations of
--- contrib/ntp/ntpd/ntp.conf.5mdoc.orig
+++ contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_CONF 5mdoc File Formats
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:53 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.conf.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -144,6 +144,7 @@
 .Op Cm prefer
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic server Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -154,6 +155,7 @@
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
 .Op Cm true
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic peer Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -346,9 +348,6 @@
 The server is discarded by the selection algroithm.
 .It Cm preempt
 Says the association can be preempted.
-.It Cm true
-Marks the server as a truechimer.
-Use this option only for testing.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -362,7 +361,8 @@
 .Pa /usr/share/doc/ntp )
 for further information.
 .It Cm true
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 .Em only
 be used while testing an association.
@@ -390,6 +390,12 @@
 and
 .Cm broadcast
 modes only, this flag enables interleave mode.
+.It Cm xmtnonce
+Valid only for
+.Cm server
+and
+.Cm pool
+modes, this flag puts a random number in the packet's transmit timestamp.
 .El
 .Ss Auxiliary Commands
 .Bl -tag -width indent
@@ -1694,6 +1700,10 @@
 .Cm ntpport
 is considered more specific and
 is sorted later in the list.
+.It Ic "serverresponse fuzz"
+When reponding to server requests,
+fuzz the low order bits of the
+.Cm reftime .
 .It Cm version
 Deny packets that do not match the current NTP version.
 .El
@@ -2919,6 +2929,31 @@
 one telephone number used to dial the telephone JJY service.
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
+.It Xo Cm pollskewlist
+.Oo
+.Ar poll
+.Ar value | value
+.Oc
+.Ar ...
+.Oo
+.Cm default
+.Ar value | value
+.Oc
+.Xc
+Enable skewing of our poll requests to our servers.
+.Ar poll
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one\-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
 .It Xo Ic reset
 .Oo
 .Ic allpeers
@@ -3255,7 +3290,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The syntax checking is not picky; some combinations of
--- contrib/ntp/ntpd/ntp.conf.def.orig
+++ contrib/ntp/ntpd/ntp.conf.def
@@ -146,6 +146,7 @@
 .Op Cm prefer
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic server Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -156,6 +157,7 @@
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
 .Op Cm true
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic peer Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -348,9 +350,6 @@
 The server is discarded by the selection algroithm.
 .It Cm preempt
 Says the association can be preempted.
-.It Cm true
-Marks the server as a truechimer.
-Use this option only for testing.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -364,7 +363,8 @@
 .Pa /usr/share/doc/ntp )
 for further information.
 .It Cm true
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 .Em only
 be used while testing an association.
@@ -392,6 +392,13 @@
 and
 .Cm broadcast
 modes only, this flag enables interleave mode.
+.It Cm xmtnonce
+Valid only for
+.Cm server
+and
+.Cm pool
+modes, this flag puts a random number in the packet's transmit timestamp.
+
 .El
 .Ss Auxiliary Commands
 .Bl -tag -width indent
@@ -1696,6 +1703,10 @@
 .Cm ntpport
 is considered more specific and
 is sorted later in the list.
+.It Ic "serverresponse fuzz"
+When reponding to server requests,
+fuzz the low order bits of the
+.Cm reftime .
 .It Cm version
 Deny packets that do not match the current NTP version.
 .El
@@ -2921,6 +2932,31 @@
 one telephone number used to dial the telephone JJY service.
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
+.It Xo Cm pollskewlist
+.Oo
+.Ar poll
+.Ar value | value
+.Oc
+.Ar ...
+.Oo
+.Cm default
+.Ar value | value
+.Oc
+.Xc
+Enable skewing of our poll requests to our servers.
+.Ar poll
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
 .It Xo Ic reset
 .Oo
 .Ic allpeers
--- contrib/ntp/ntpd/ntp.conf.html.orig
+++ contrib/ntp/ntpd/ntp.conf.html
@@ -61,7 +61,7 @@
 <p>This document describes the configuration file for the NTP Project&rsquo;s
 <code>ntpd</code> program.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntp.conf</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntp.conf</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -257,8 +257,8 @@
 See IPv6 references for the
 equivalent classes for that address family.
 </p><dl compact="compact">
-<dt><code>pool</code> <kbd>address</kbd> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code></dt>
-<dt><code>server</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code></dt>
+<dt><code>pool</code> <kbd>address</kbd> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>xmtnonce</code>]</code></dt>
+<dt><code>server</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code> <code>[<code>xmtnonce</code>]</code></dt>
 <dt><code>peer</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code> <code>[<code>xleave</code>]</code></dt>
 <dt><code>broadcast</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code> <code>[<code>xleave</code>]</code></dt>
 <dt><code>manycastclient</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code></dt>
@@ -440,10 +440,6 @@
 <dt><code>preempt</code></dt>
 <dd><p>Says the association can be preempted.
 </p></dd>
-<dt><code>true</code></dt>
-<dd><p>Marks the server as a truechimer.
-Use this option only for testing.
-</p></dd>
 <dt><code>prefer</code></dt>
 <dd><p>Marks the server as preferred.
 All other things being equal,
@@ -458,7 +454,8 @@
 for further information.
 </p></dd>
 <dt><code>true</code></dt>
-<dd><p>Forces the association to always survive the selection and clustering algorithms.
+<dd><p>Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 <em>only</em>
 be used while testing an association.
@@ -490,6 +487,14 @@
 <code>broadcast</code>
 modes only, this flag enables interleave mode.
 </p></dd>
+<dt><code>xmtnonce</code></dt>
+<dd><p>Valid only for
+<code>server</code>
+and
+<code>pool</code>
+modes, this flag puts a random number in the packet&rsquo;s transmit timestamp.
+</p>
+</dd>
 </dl>
 <a name="Auxiliary-Commands"></a>
 <h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
@@ -1862,6 +1867,11 @@
 is considered more specific and
 is sorted later in the list.
 </p></dd>
+<dt><code>serverresponse fuzz</code></dt>
+<dd><p>When reponding to server requests,
+fuzz the low order bits of the
+<code>reftime</code>.
+</p></dd>
 <dt><code>version</code></dt>
 <dd><p>Deny packets that do not match the current NTP version.
 </p></dd>
@@ -3077,6 +3087,22 @@
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
 </p></dd>
+<dt><code>pollskewlist</code> <code>[<kbd>poll</kbd> <kbd>value</kbd> | <kbd>value</kbd>]</code> <kbd>...</kbd> <code>[<code>default</code> <kbd>value</kbd> | <kbd>value</kbd>]</code></dt>
+<dd><p>Enable skewing of our poll requests to our servers.
+<kbd>poll</kbd>
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
+</p></dd>
 <dt><code>reset</code> <code>[<code>allpeers</code>]</code> <code>[<code>auth</code>]</code> <code>[<code>ctl</code>]</code> <code>[<code>io</code>]</code> <code>[<code>mem</code>]</code> <code>[<code>sys</code>]</code> <code>[<code>timer</code>]</code></dt>
 <dd><p>Reset one or more groups of counters maintained by
 <code>ntpd</code>
--- contrib/ntp/ntpd/ntp.conf.man.in.orig
+++ contrib/ntp/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp.conf 5 "20 Feb 2019" "4.2.8p13" "File Formats"
+.TH ntp.conf 5 "03 Mar 2020" "4.2.8p14" "File Formats"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:02 PM by AutoGen 5.18.5
 .\" From the definitions ntp.conf.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -161,9 +161,9 @@
 See IPv6 references for the
 equivalent classes for that address family.
 .TP 7
-.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]xmtnonce\f[]]
 .TP 7
-.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]]
+.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]] [\f\*[B-Font]xmtnonce\f[]]
 .TP 7
 .NOP \f\*[B-Font]peer\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]] [\f\*[B-Font]xleave\f[]]
 .TP 7
@@ -352,10 +352,6 @@
 .NOP \f\*[B-Font]preempt\f[]
 Says the association can be preempted.
 .TP 7
-.NOP \f\*[B-Font]true\f[]
-Marks the server as a truechimer.
-Use this option only for testing.
-.TP 7
 .NOP \f\*[B-Font]prefer\f[]
 Marks the server as preferred.
 All other things being equal,
@@ -370,7 +366,8 @@
 for further information.
 .TP 7
 .NOP \f\*[B-Font]true\f[]
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 \fIonly\f[]
 be used while testing an association.
@@ -401,6 +398,13 @@
 and
 \f\*[B-Font]broadcast\f[]
 modes only, this flag enables interleave mode.
+.TP 7
+.NOP \f\*[B-Font]xmtnonce\f[]
+Valid only for
+\f\*[B-Font]server\f[]
+and
+\f\*[B-Font]pool\f[]
+modes, this flag puts a random number in the packet's transmit timestamp.
 .PP
 .SS Auxiliary Commands
 .TP 7
@@ -1838,6 +1842,11 @@
 is considered more specific and
 is sorted later in the list.
 .TP 7
+.NOP \f\*[B-Font]serverresponse fuzz\f[]
+When reponding to server requests,
+fuzz the low order bits of the
+\f\*[B-Font]reftime\f[].
+.TP 7
 .NOP \f\*[B-Font]version\f[]
 Deny packets that do not match the current NTP version.
 .RE
@@ -3092,6 +3101,22 @@
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
 .TP 7
+.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]]
+Enable skewing of our poll requests to our servers.
+\f\*[I-Font]poll\f[]
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
+.TP 7
 .NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
 Reset one or more groups of counters maintained by
 \f\*[B-Font]ntpd\f[]
@@ -3424,7 +3449,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The syntax checking is not picky; some combinations of
--- contrib/ntp/ntpd/ntp.conf.mdoc.in.orig
+++ contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_CONF 5 File Formats
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:53 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.conf.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -144,6 +144,7 @@
 .Op Cm prefer
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic server Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -154,6 +155,7 @@
 .Op Cm minpoll Ar minpoll
 .Op Cm maxpoll Ar maxpoll
 .Op Cm true
+.Op Cm xmtnonce
 .Xc
 .It Xo Ic peer Ar address
 .Op Cm key Ar key \&| Cm autokey
@@ -346,9 +348,6 @@
 The server is discarded by the selection algroithm.
 .It Cm preempt
 Says the association can be preempted.
-.It Cm true
-Marks the server as a truechimer.
-Use this option only for testing.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -362,7 +361,8 @@
 .Pa /usr/share/doc/ntp )
 for further information.
 .It Cm true
-Forces the association to always survive the selection and clustering algorithms.
+Marks the server as a truechimer,
+forcing the association to always survive the selection and clustering algorithms.
 This option should almost certainly
 .Em only
 be used while testing an association.
@@ -390,6 +390,12 @@
 and
 .Cm broadcast
 modes only, this flag enables interleave mode.
+.It Cm xmtnonce
+Valid only for
+.Cm server
+and
+.Cm pool
+modes, this flag puts a random number in the packet's transmit timestamp.
 .El
 .Ss Auxiliary Commands
 .Bl -tag -width indent
@@ -1694,6 +1700,10 @@
 .Cm ntpport
 is considered more specific and
 is sorted later in the list.
+.It Ic "serverresponse fuzz"
+When reponding to server requests,
+fuzz the low order bits of the
+.Cm reftime .
 .It Cm version
 Deny packets that do not match the current NTP version.
 .El
@@ -2919,6 +2929,31 @@
 one telephone number used to dial the telephone JJY service.
 The Hayes command ATDT is normally prepended to the number.
 The number can contain other modem control codes as well.
+.It Xo Cm pollskewlist
+.Oo
+.Ar poll
+.Ar value | value
+.Oc
+.Ar ...
+.Oo
+.Cm default
+.Ar value | value
+.Oc
+.Xc
+Enable skewing of our poll requests to our servers.
+.Ar poll
+is a number between 3 and 17 inclusive, identifying a specific poll interval.
+A poll interval is 2^n seconds in duration,
+so a poll value of 3 corresponds to 8 seconds
+and
+a poll interval of 17 corresponds to
+131,072 seconds, or about a day and a half.
+The next two numbers must be between 0 and one\-half of the poll interval,
+inclusive.
+The first number specifies how early the poll may start,
+while
+the second number specifies how late the poll may be delayed.
+With no arguments, internally specified default values are chosen.
 .It Xo Ic reset
 .Oo
 .Ic allpeers
@@ -3255,7 +3290,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The syntax checking is not picky; some combinations of
--- contrib/ntp/ntpd/ntp.keys.5man.orig
+++ contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "20 Feb 2019" "4.2.8p13" "File Formats"
+.TH ntp.keys 5man "03 Mar 2020" "4.2.8p14" "File Formats"
 .\"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.man)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:04 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.keys.def
 .\"  and the template file   agman-file.tpl
 .Sh NAME
@@ -176,7 +176,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpd/ntp.keys.5mdoc.orig
+++ contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_KEYS 5mdoc File Formats
 .Os FreeBSD 11.2-RELEASE_SI
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:54 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.keys.def
 .\"  and the template file   agmdoc-file.tpl
 .Sh NAME
@@ -163,7 +163,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpd/ntp.keys.html.orig
+++ contrib/ntp/ntpd/ntp.keys.html
@@ -61,7 +61,7 @@
 <p>This document describes the symmetric key file for the NTP Project&rsquo;s
 <code>ntpd</code> program.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntp.keys</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntp.keys</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
--- contrib/ntp/ntpd/ntp.keys.man.in.orig
+++ contrib/ntp/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "20 Feb 2019" "4.2.8p13" "File Formats"
+.TH ntp.keys 5 "03 Mar 2020" "4.2.8p14" "File Formats"
 .\"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.man)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:04 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.keys.def
 .\"  and the template file   agman-file.tpl
 .Sh NAME
@@ -176,7 +176,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpd/ntp.keys.mdoc.in.orig
+++ contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_KEYS 5 File Formats
 .Os FreeBSD 11.2-RELEASE_SI
 .\"  EDIT THIS FILE WITH CAUTION  (ntp.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:54 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp.keys.def
 .\"  and the template file   agmdoc-file.tpl
 .Sh NAME
@@ -163,7 +163,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpd/ntp_config.c.orig
+++ contrib/ntp/ntpd/ntp_config.c
@@ -29,6 +29,7 @@
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
 #endif
+#include <time.h>
 
 #include <isc/net.h>
 #include <isc/result.h>
@@ -148,7 +149,7 @@
  */
 extern int yydebug;			/* ntp_parser.c (.y) */
 config_tree cfgt;			/* Parser output stored here */
-struct config_tree_tag *cfg_tree_history;	/* History of configs */
+config_tree *cfg_tree_history;		/* History of configs */
 char *	sys_phone[MAXPHONE] = {NULL};	/* ACTS phone numbers */
 char	default_keysdir[] = NTP_KEYSDIR;
 char *	keysdir = default_keysdir;	/* crypto keys directory */
@@ -324,6 +325,7 @@
 static void config_ntpd(config_tree *, int/*BOOL*/ input_from_file);
 static void config_other_modes(config_tree *);
 static void config_auth(config_tree *);
+static void attrtopsl(int poll, attr_val *avp);
 static void config_access(config_tree *);
 static void config_mdnstries(config_tree *);
 static void config_phone(config_tree *);
@@ -500,7 +502,14 @@
 {
 	config_tree *	cfg_ptr;
 	int		return_value;
+	time_t		now = time(NULL);
+	struct tm	tm = *localtime(&now);
 
+	fprintf(df, "#NTF:D %04d%02d%02d@%02d:%02d:%02d\n",
+		tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+		tm.tm_hour, tm.tm_min, tm.tm_sec);
+	fprintf(df, "#NTF:V %s\n", Version);
+
 	return_value = 0;
 	for (cfg_ptr = cfg_tree_history;
 	     cfg_ptr != NULL;
@@ -531,7 +540,6 @@
 	setvar_node *setv_node;
 	nic_rule_node *rule_node;
 	int_node *i_n;
-	int_node *flag_tok_fifo;
 	int_node *counter_set;
 	string_node *str_node;
 
@@ -591,6 +599,11 @@
 				atrv = atrv->link;
 				fprintf(df, " %s\n",
 					normal_dtoa(atrv->value.d));
+			} else if (T_Leapfile == atrv->attr) {
+				fputs((atrv->flag
+				       ? " checkhash\n"
+				       : " ignorehash\n"),
+				      df);
 			} else {
 				fprintf(df, "\n");
 			}
@@ -925,6 +938,21 @@
 		fprintf(df, "\n");
 	}
 
+	atrv = HEAD_PFIFO(ptree->pollskewlist);
+	if (atrv != NULL) {
+		fprintf(df, "pollskewlist");
+		for ( ; atrv != NULL; atrv = atrv->link) {
+			if (-1 == atrv->attr) {
+				fprintf(df, " default");
+			} else {
+				fprintf(df, " %d", atrv->attr);
+			}
+			fprintf(df, " %d|%d",
+				atrv->value.r.first, atrv->value.r.last);
+		}
+		fprintf(df, "\n");
+	}
+
 	for (rest_node = HEAD_PFIFO(ptree->restrict_opts);
 	     rest_node != NULL;
 	     rest_node = rest_node->link) {
@@ -933,9 +961,10 @@
 		if (NULL == rest_node->addr) {
 			s = "default";
 			/* Don't need to set is_default=1 here */
-			flag_tok_fifo = HEAD_PFIFO(rest_node->flag_tok_fifo);
-			for ( ; flag_tok_fifo != NULL; flag_tok_fifo = flag_tok_fifo->link) {
-				if (T_Source == flag_tok_fifo->i) {
+			atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
+			for ( ; atrv != NULL; atrv = atrv->link) {
+				if (   T_Integer == atrv->type
+				    && T_Source == atrv->attr) {
 					s = "source";
 					break;
 				}
@@ -967,12 +996,35 @@
 			fprintf(df, " mask %s",
 				rest_node->mask->address);
 		fprintf(df, " ippeerlimit %d", rest_node->ippeerlimit);
-		flag_tok_fifo = HEAD_PFIFO(rest_node->flag_tok_fifo);
-		for ( ; flag_tok_fifo != NULL; flag_tok_fifo = flag_tok_fifo->link)
-			if (T_Source != flag_tok_fifo->i)
-				fprintf(df, " %s", keyword(flag_tok_fifo->i));
-		fprintf(df, "\n");
+		atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
+		for ( ; atrv != NULL; atrv = atrv->link) {
+			if (   T_Integer == atrv->type
+			    && T_Source != atrv->attr) {
+				fprintf(df, " %s", keyword(atrv->attr));
+			}
+		}
+		fprintf(df, "\n");            
+/**/
+#if 0
+msyslog(LOG_INFO, "Dumping flag_tok_fifo:");
+atrv = HEAD_PFIFO(rest_node->flag_tok_fifo);
+for ( ; atrv != NULL; atrv = atrv->link) {
+	msyslog(LOG_INFO, "- flag_tok_fifo: flags: %08x", atrv->flag);
+	switch(atrv->type) {
+	    case T_Integer:
+		msyslog(LOG_INFO, "- T_Integer: attr <%s>/%d, value %d",
+			keyword(atrv->attr), atrv->attr, atrv->value.i);
+		break;
+	    default:
+		msyslog(LOG_INFO, "- Other: attr <%s>/%d, value ???",
+			keyword(atrv->attr), atrv->attr);
+		break;
+	    	
 	}
+}
+#endif
+/**/
+	}
 
 	rule_node = HEAD_PFIFO(ptree->nic_rules);
 	for ( ; rule_node != NULL; rule_node = rule_node->link) {
@@ -1053,7 +1105,6 @@
 #endif	/* SAVECONFIG */
 
 
-
 /* generic fifo routines for structs linked by 1st member */
 void *
 append_gen_fifo(
@@ -1191,7 +1242,7 @@
 
 
 attr_val *
-create_attr_rangeval(
+create_attr_rval(
 	int	attr,
 	int	first,
 	int	last
@@ -1480,8 +1531,8 @@
 	address_node *	addr,
 	address_node *	mask,
 	short		ippeerlimit,
-	int_fifo *	flag_tok_fifo,
-	int		line_no
+	attr_val_fifo *	flag_tok_fifo,
+	int		nline
 	)
 {
 	restrict_node *my_node;
@@ -1491,7 +1542,7 @@
 	my_node->mask = mask;
 	my_node->ippeerlimit = ippeerlimit;
 	my_node->flag_tok_fifo = flag_tok_fifo;
-	my_node->line_no = line_no;
+	my_node->line_no = nline;
 
 	return my_node;
 }
@@ -1507,7 +1558,7 @@
 	 */
 	destroy_address_node(my_node->addr);
 	destroy_address_node(my_node->mask);
-	destroy_int_fifo(my_node->flag_tok_fifo);
+	destroy_attr_val_fifo(my_node->flag_tok_fifo);
 	free(my_node);
 }
 
@@ -2307,7 +2358,7 @@
 
 	/* Set the statistics directory */
 	if (ptree->stats_dir)
-		stats_config(STATS_STATSDIR, ptree->stats_dir);
+	    stats_config(STATS_STATSDIR, ptree->stats_dir, 0);
 
 	/* NOTE:
 	 * Calling filegen_get is brain dead. Doing a string
@@ -2472,7 +2523,6 @@
 	static int		warned_signd;
 	attr_val *		my_opt;
 	restrict_node *		my_node;
-	int_node *		curr_tok_fifo;
 	sockaddr_u		addr;
 	sockaddr_u		mask;
 	struct addrinfo		hints;
@@ -2484,6 +2534,9 @@
 	u_short			mflags;
 	short			ippeerlimit;
 	int			range_err;
+	psl_item		my_psl_item;
+	attr_val *		atrv;
+	attr_val *		dflt_psl_atr;
 	const char *		signd_warning =
 #ifdef HAVE_NTP_SIGND
 	    "MS-SNTP signd operations currently block ntpd degrading service to all clients.";
@@ -2599,25 +2652,24 @@
 		}
 	}
 
-	/* Configure the restrict options */
+	/* Configure each line of restrict options */
 	my_node = HEAD_PFIFO(ptree->restrict_opts);
 
 	for (; my_node != NULL; my_node = my_node->link) {
+
 		/* Grab the ippeerlmit */
 		ippeerlimit = my_node->ippeerlimit;
 
-DPRINTF(1, ("config_access: top-level node %p: ippeerlimit %d\n", my_node, ippeerlimit));
-
 		/* Parse the flags */
 		rflags = 0;
 		mflags = 0;
 
-		curr_tok_fifo = HEAD_PFIFO(my_node->flag_tok_fifo);
-		for (; curr_tok_fifo != NULL; curr_tok_fifo = curr_tok_fifo->link) {
-			switch (curr_tok_fifo->i) {
+		my_opt = HEAD_PFIFO(my_node->flag_tok_fifo);
+		for (; my_opt != NULL; my_opt = my_opt->link) {
+			switch (my_opt->attr) {
 
 			default:
-				fatal_error("config_access: flag-type-token=%d", curr_tok_fifo->i);
+				fatal_error("config_access: Unknown flag-type-token=%s/%d", keyword(my_opt->attr), my_opt->attr);
 
 			case T_Ntpport:
 				mflags |= RESM_NTPONLY;
@@ -2639,10 +2691,6 @@
 				rflags |= RES_KOD;
 				break;
 
-			case T_Mssntp:
-				rflags |= RES_MSSNTP;
-				break;
-
 			case T_Limited:
 				rflags |= RES_LIMITED;
 				break;
@@ -2651,6 +2699,10 @@
 				rflags |= RES_LPTRAP;
 				break;
 
+			case T_Mssntp:
+				rflags |= RES_MSSNTP;
+				break;
+
 			case T_Nomodify:
 				rflags |= RES_NOMODIFY;
 				break;
@@ -2683,6 +2735,10 @@
 				rflags |= RES_DONTTRUST;
 				break;
 
+			case T_ServerresponseFuzz:
+				rflags |= RES_SRVRSPFUZ;
+				break;
+
 			case T_Version:
 				rflags |= RES_VERSION;
 				break;
@@ -2822,10 +2878,171 @@
 		if (ai_list != NULL)
 			freeaddrinfo(ai_list);
 	}
+
+	/* Deal with the Poll Skew List */
+
+	ZERO(psl);
+	ZERO(my_psl_item);
+
+	/*
+	 * First, find the last default pollskewlist item.
+	 * There should only be one of these with the current grammar,
+	 * but better safe than sorry.
+	 */
+	dflt_psl_atr = NULL;
+	atrv = HEAD_PFIFO(ptree->pollskewlist);
+	for ( ; atrv != NULL; atrv = atrv->link) {
+		switch (atrv->attr) {
+		case -1:	/* default */
+			dflt_psl_atr = atrv;
+			break;
+
+		case 3:		/* Fall through */
+		case 4:		/* Fall through */
+		case 5:		/* Fall through */
+		case 6:		/* Fall through */
+		case 7:		/* Fall through */
+		case 8:		/* Fall through */
+		case 9:		/* Fall through */
+		case 10:	/* Fall through */
+		case 11:	/* Fall through */
+		case 12:	/* Fall through */
+		case 13:	/* Fall through */
+		case 14:	/* Fall through */
+		case 15:	/* Fall through */
+		case 16:	/* Fall through */
+		case 17:
+			/* ignore */
+			break;
+
+		default:
+			msyslog(LOG_ERR,
+				"config_access: default PSL scan: ignoring unexpected poll value %d",
+				atrv->attr);
+			break;
+		}
+	}
+
+	/* If we have a nonzero default, initialize the PSL */
+	if (   dflt_psl_atr
+	    && (   0 != dflt_psl_atr->value.r.first
+		|| 0 != dflt_psl_atr->value.r.last)) {
+		int i;
+
+		for (i = 3; i <= 17; ++i) {
+			attrtopsl(i, dflt_psl_atr);
+		}
+	}
+
+	/* Finally, update the PSL with any explicit entries */
+	atrv = HEAD_PFIFO(ptree->pollskewlist);
+	for ( ; atrv != NULL; atrv = atrv->link) {
+		switch (atrv->attr) {
+		case -1:	/* default */
+			/* Ignore */
+			break;
+
+		case 3:		/* Fall through */
+		case 4:		/* Fall through */
+		case 5:		/* Fall through */
+		case 6:		/* Fall through */
+		case 7:		/* Fall through */
+		case 8:		/* Fall through */
+		case 9:		/* Fall through */
+		case 10:	/* Fall through */
+		case 11:	/* Fall through */
+		case 12:	/* Fall through */
+		case 13:	/* Fall through */
+		case 14:	/* Fall through */
+		case 15:	/* Fall through */
+		case 16:	/* Fall through */
+		case 17:
+			attrtopsl(atrv->attr, atrv);
+			break;
+
+		default:
+			break;	/* Ignore - we reported this above */
+		}
+	}
+
+#if 0
+	int p;
+	msyslog(LOG_INFO, "Dumping PSL:");
+	for (p = 3; p <= 17; ++p) {
+		psl_item psi;
+
+		if (0 == get_pollskew(p, &psi)) {
+			msyslog(LOG_INFO, "poll %d: sub %d, qty %d, msk %d",
+				p, psi.sub, psi.qty, psi.msk);
+		} else {
+			msyslog(LOG_ERR, "Dumping PSL: get_pollskew(%d) failed!", p);
+		}
+	}
+#endif
 }
+
+
+void
+attrtopsl(int poll, attr_val *avp)
+{
+
+	DEBUG_INSIST((poll - 3) < sizeof psl);
+	if (poll < 3 || poll > 17) {
+		msyslog(LOG_ERR, "attrtopsl(%d, ...): Poll value is out of range - ignoring", poll);
+	} else {
+		int pao = poll - 3;		/* poll array offset */
+		int lower = avp->value.r.first;	/* a positive number */
+		int upper = avp->value.r.last;
+		int psmax = 1 << (poll - 1);
+		int qmsk;
+
+		if (lower > psmax) {
+			msyslog(LOG_WARNING, "attrtopsl: default: poll %d lower bound reduced from %d to %d",
+				poll, lower, psmax);
+			lower = psmax;
+		}
+		if (upper > psmax) {
+			msyslog(LOG_WARNING, "attrtopsl: default: poll %d upper bound reduced from %d to %d",
+				poll, upper, psmax);
+			upper = psmax;
+		}
+		psl[pao].sub = lower;
+		psl[pao].qty = lower + upper;
+
+		qmsk = 1;
+		while (qmsk < (lower + upper)) {
+			qmsk <<= 1;
+			qmsk |=  1;
+		};
+		psl[pao].msk = qmsk;
+	}
+
+	return;
+} 
 #endif	/* !SIM */
 
 
+int
+get_pollskew(
+	int p,
+	psl_item *rv
+	)
+{
+
+	DEBUG_INSIST(3 <= p && 17 >= p);
+	if (3 <= p && 17 >= p) {
+		*rv = psl[p - 3];
+
+		return 0;
+	} else {
+		msyslog(LOG_ERR, "get_pollskew(%d): poll is not between 3 and 17!", p);
+		return -1;
+	}
+
+	/* NOTREACHED */
+}
+
+
 #ifdef FREE_CFG_T
 static void
 free_config_access(
@@ -3644,6 +3861,13 @@
 
 		/* Parse all the options to the fudge command */
 		ZERO(clock_stat);
+		/* some things are not necessarily cleared by ZERO...*/
+		clock_stat.fudgeminjitter = 0.0;
+		clock_stat.fudgetime1     = 0.0;
+		clock_stat.fudgetime2     = 0.0;
+		clock_stat.p_lastcode     = NULL;
+		clock_stat.clockdesc      = NULL;
+		clock_stat.kv_list        = NULL;
 		curr_opt = HEAD_PFIFO(curr_fudge->options);
 		for (; curr_opt != NULL; curr_opt = curr_opt->link) {
 			switch (curr_opt->attr) {
@@ -3665,10 +3889,9 @@
 
 			case T_Refid:
 				clock_stat.haveflags |= CLK_HAVEVAL2;
-				clock_stat.fudgeval2 = 0;
-				memcpy(&clock_stat.fudgeval2,
-				       curr_opt->value.s,
-				       min(strlen(curr_opt->value.s), 4));
+				/* strncpy() does exactly what we want here: */
+				strncpy((char*)&clock_stat.fudgeval2,
+					curr_opt->value.s, 4);
 				break;
 
 			case T_Flag1:
@@ -3703,6 +3926,11 @@
 					clock_stat.flags &= ~CLK_FLAG4;
 				break;
 
+			case T_Minjitter:
+				clock_stat.haveflags |= CLK_HAVEMINJIT;
+				clock_stat.fudgeminjitter = curr_opt->value.d;
+				break;
+
 			default:
 				msyslog(LOG_ERR,
 					"Unexpected fudge flag %s (%d) for %s",
@@ -3757,7 +3985,7 @@
 				stats_drift_file = 0;
 				msyslog(LOG_INFO, "config: driftfile disabled");
 			} else
-				stats_config(STATS_FREQ_FILE, curr_var->value.s);
+			    stats_config(STATS_FREQ_FILE, curr_var->value.s, 0);
 			break;
 
 		case T_Dscp:
@@ -3775,7 +4003,7 @@
 			break;
 
 		case T_Leapfile:
-			stats_config(STATS_LEAP_FILE, curr_var->value.s);
+		    stats_config(STATS_LEAP_FILE, curr_var->value.s, curr_var->flag);
 			break;
 
 #ifdef LEAP_SMEAR
@@ -3786,7 +4014,7 @@
 #endif
 
 		case T_Pidfile:
-			stats_config(STATS_PID_FILE, curr_var->value.s);
+		    stats_config(STATS_PID_FILE, curr_var->value.s, 0);
 			break;
 
 		case T_Logfile:
@@ -3866,9 +4094,9 @@
 		return 0;
 	}
 	/*
-	 * Shouldn't be able to specify multicast
-	 * address for server/peer!
-	 * and unicast address for manycastclient!
+	 * Shouldn't be able to specify:
+	 * - multicast address for server/peer!
+	 * - unicast address for manycastclient!
 	 */
 	if ((T_Server == hmode || T_Peer == hmode || T_Pool == hmode)
 	    && IS_MCAST(peeraddr)) {
@@ -3928,9 +4156,12 @@
 {
 	int peerflags;
 	attr_val *option;
+	int	hmode;
 
+	DEBUG_INSIST(pn);
 	/* translate peerflags options to bits */
 	peerflags = 0;
+	hmode = pn->host_mode;
 	option = HEAD_PFIFO(pn->peerflags);
 	for (; option != NULL; option = option->link) {
 		switch (option->value.i) {
@@ -3969,6 +4200,12 @@
 		case T_Xleave:
 			peerflags |= FLAG_XLEAVE;
 			break;
+
+		case T_Xmtnonce:
+			if (   MODE_CLIENT == hmode ) {
+				peerflags |= FLAG_LOOPNONCE;
+			}
+			break;
 		}
 	}
 
@@ -5278,7 +5515,9 @@
 
 
 char *
-build_iflags(u_int32 iflags)
+build_iflags(
+	u_int32 iflags
+	)
 {
 	static char ifs[1024];
 
@@ -5351,7 +5590,9 @@
 
 
 char *
-build_mflags(u_short mflags)
+build_mflags(
+	u_short mflags
+	)
 {
 	static char mfs[1024];
 
@@ -5379,7 +5620,9 @@
 
 
 char *
-build_rflags(u_short rflags)
+build_rflags(
+	u_short rflags
+	)
 {
 	static char rfs[1024];
 
@@ -5455,6 +5698,11 @@
 		appendstr(rfs, sizeof rfs, "notrust");
 	}
 
+	if (rflags & RES_SRVRSPFUZ) {
+		rflags &= ~RES_SRVRSPFUZ;
+		appendstr(rfs, sizeof rfs, "srvrspfuz");
+	}
+
 	if (rflags & RES_VERSION) {
 		rflags &= ~RES_VERSION;
 		appendstr(rfs, sizeof rfs, "version");
--- contrib/ntp/ntpd/ntp_control.c.orig
+++ contrib/ntp/ntpd/ntp_control.c
@@ -28,6 +28,8 @@
 #include "ntp_leapsec.h"
 #include "ntp_md5.h"	/* provides OpenSSL digest API */
 #include "lib_strbuf.h"
+#include "timexsup.h"
+
 #include <rc_cmdlength.h>
 #ifdef KERNEL_PLL
 # include "ntp_syscall.h"
@@ -327,7 +329,8 @@
 #define	CC_FLAGS	11
 #define	CC_DEVICE	12
 #define	CC_VARLIST	13
-#define	CC_MAXCODE	CC_VARLIST
+#define	CC_FUDGEMINJIT	14
+#define	CC_MAXCODE	CC_FUDGEMINJIT
 
 /*
  * System variable values. The array can be indexed by the variable
@@ -625,7 +628,8 @@
 	{ CC_FLAGS,	RO, "flags" },		/* 11 */
 	{ CC_DEVICE,	RO, "device" },		/* 12 */
 	{ CC_VARLIST,	RO, "clock_var_list" },	/* 13 */
-	{ 0,		EOV, ""  }		/* 14 */
+	{ CC_FUDGEMINJIT, RO, "minjitter" },	/* 14 */
+	{ 0,		EOV, ""  }		/* 15 */
 };
 
 
@@ -640,6 +644,7 @@
 	CC_NOREPLY,
 	CC_BADFORMAT,
 	CC_BADDATA,
+	CC_FUDGEMINJIT,
 	CC_FUDGETIME1,
 	CC_FUDGETIME2,
 	CC_FUDGEVAL1,
@@ -1187,15 +1192,21 @@
 	pkt = (struct ntp_control *)&rbufp->recv_pkt;
 
 	/*
-	 * If the length is less than required for the header, or
-	 * it is a response or a fragment, ignore this.
+	 * If the length is less than required for the header,
+	 * ignore it.
 	 */
-	if (rbufp->recv_length < (int)CTL_HEADER_LEN
-	    || (CTL_RESPONSE | CTL_MORE | CTL_ERROR) & pkt->r_m_e_op
+	if (rbufp->recv_length < (int)CTL_HEADER_LEN) {
+		DPRINTF(1, ("Short control packet\n"));
+		numctltooshort++;
+		return;
+	}
+
+	/*
+	 * If this packet is a response or a fragment, ignore it.
+	 */
+	if (   (CTL_RESPONSE | CTL_MORE | CTL_ERROR) & pkt->r_m_e_op
 	    || pkt->offset != 0) {
 		DPRINTF(1, ("invalid format in control packet\n"));
-		if (rbufp->recv_length < (int)CTL_HEADER_LEN)
-			numctltooshort++;
 		if (CTL_RESPONSE & pkt->r_m_e_op)
 			numctlinputresp++;
 		if (CTL_MORE & pkt->r_m_e_op)
@@ -1206,6 +1217,7 @@
 			numctlbadoffset++;
 		return;
 	}
+
 	res_version = PKT_VERSION(pkt->li_vn_mode);
 	if (res_version > NTP_VERSION || res_version < NTP_OLDVERSION) {
 		DPRINTF(1, ("unknown version %d in control packet\n",
@@ -1910,15 +1922,6 @@
 	static struct timex ntx;
 	static u_long ntp_adjtime_time;
 
-	static const double to_ms_usec =
-		1.0e-3; /* usec to msec */
-	static const double to_ms_nusec =
-# ifdef STA_NANO
-		1.0e-6; /* nsec to msec */
-# else
-		to_ms_usec;
-# endif
-
 	/*
 	 * CS_K_* variables depend on up-to-date output of ntp_adjtime()
 	 */
@@ -2321,7 +2324,8 @@
 	case CS_K_OFFSET:
 		CTL_IF_KERNLOOP(
 			ctl_putdblf,
-			(sys_var[varid].text, 0, -1, to_ms_nusec * ntx.offset)
+			(sys_var[varid].text, 0, -1,
+			 1000 * dbl_from_var_long(ntx.offset, ntx.status))
 		);
 		break;
 
@@ -2336,7 +2340,7 @@
 		CTL_IF_KERNLOOP(
 			ctl_putdblf,
 			(sys_var[varid].text, 0, 6,
-			 to_ms_usec * ntx.maxerror)
+			 1000 * dbl_from_usec_long(ntx.maxerror))
 		);
 		break;
 
@@ -2344,7 +2348,7 @@
 		CTL_IF_KERNLOOP(
 			ctl_putdblf,
 			(sys_var[varid].text, 0, 6,
-			 to_ms_usec * ntx.esterror)
+			 1000 * dbl_from_usec_long(ntx.esterror))
 		);
 		break;
 
@@ -2368,7 +2372,7 @@
 		CTL_IF_KERNLOOP(
 			ctl_putdblf,
 			(sys_var[varid].text, 0, 6,
-			    to_ms_usec * ntx.precision)
+			 1000 * dbl_from_var_long(ntx.precision, ntx.status))
 		);
 		break;
 
@@ -2396,7 +2400,8 @@
 	case CS_K_PPS_JITTER:
 		CTL_IF_KERNPPS(
 			ctl_putdbl,
-			(sys_var[varid].text, to_ms_nusec * ntx.jitter)
+			(sys_var[varid].text,
+			 1000 * dbl_from_var_long(ntx.jitter, ntx.status))
 		);
 		break;
 
@@ -2965,14 +2970,9 @@
 		break;
 
 	case CC_FUDGEVAL2:
-		if (mustput || (pcs->haveflags & CLK_HAVEVAL2)) {
-			if (pcs->fudgeval1 > 1)
-				ctl_putadr(clock_var[id].text,
-					   pcs->fudgeval2, NULL);
-			else
-				ctl_putrefid(clock_var[id].text,
-					     pcs->fudgeval2);
-		}
+		/* RefID of clocks are always text even if stratum is fudged */
+		if (mustput || (pcs->haveflags & CLK_HAVEVAL2))
+			ctl_putrefid(clock_var[id].text, pcs->fudgeval2);
 		break;
 
 	case CC_FLAGS:
@@ -3045,6 +3045,16 @@
 		*s = '\0';
 		ctl_putdata(buf, (unsigned)(s - buf), 0);
 		break;
+		
+	case CC_FUDGEMINJIT:
+		if (mustput || (pcs->haveflags & CLK_HAVEMINJIT))
+			ctl_putdbl(clock_var[id].text,
+				   pcs->fudgeminjitter * 1e3);
+		break;
+
+	default:
+		break;
+
 	}
 }
 #endif
--- contrib/ntp/ntpd/ntp_io.c.orig
+++ contrib/ntp/ntpd/ntp_io.c
@@ -177,7 +177,7 @@
 endpt *	any6_interface;		/* wildcard ipv6 interface */
 endpt *	loopback_interface;	/* loopback ipv4 interface */
 
-isc_boolean_t broadcast_client_enabled;	/* is broadcast client enabled */
+static isc_boolean_t broadcast_client_enabled;	/* is broadcast client enabled */
 u_int sys_ifnum;			/* next .ifnum to assign */
 int ninterfaces;			/* Total number of interfaces */
 
@@ -2011,12 +2011,9 @@
 	 */
 	refresh_all_peerinterfaces();
 
-	if (broadcast_client_enabled)
+	if (broadcast_client_enabled || sys_bclient)
 		io_setbclient();
 
-	if (sys_bclient)
-		io_setbclient();
-
 #ifdef MCAST
 	/*
 	 * Check multicast interfaces and try to join multicast groups if
@@ -2343,11 +2340,12 @@
 /*
  * return the broadcast client flag value
  */
-isc_boolean_t
+/*isc_boolean_t
 get_broadcastclient_flag(void)
 {
 	return (broadcast_client_enabled);
 }
+*/
 
 /*
  * Check to see if the address is a multicast address
@@ -2605,32 +2603,38 @@
 io_setbclient(void)
 {
 #ifdef OPEN_BCAST_SOCKET
-	struct interface *	interf;
-	unsigned int		nif;
+	endpt *		ep;
+	unsigned int	nif, ni4, ni6;
 
-	nif = 0;
+	nif = ni4 = ni6 = 0;
 	set_reuseaddr(1);
 
-	for (interf = ep_list;
-	     interf != NULL;
-	     interf = interf->elink) {
-
-		if (interf->flags & (INT_WILDCARD | INT_LOOPBACK))
+	for (ep = ep_list; ep != NULL; ep = ep->elink) {
+		/* count IPv6 vs IPv4 interfaces. Needed later to decide
+		 * if we should log an error or not.
+		 */
+		switch (ep->family) {
+		case AF_INET : ++ni4; break;
+		case AF_INET6: ++ni6; break;
+		default      :        break;
+		}
+		
+		if (ep->flags & (INT_WILDCARD | INT_LOOPBACK))
 			continue;
 
 		/* use only allowed addresses */
-		if (interf->ignore_packets)
+		if (ep->ignore_packets)
 			continue;
 
 		/* Need a broadcast-capable interface */
-		if (!(interf->flags & INT_BROADCAST))
+		if (!(ep->flags & INT_BROADCAST))
 			continue;
 
 		/* Only IPv4 addresses are valid for broadcast */
-		REQUIRE(IS_IPV4(&interf->bcast));
+		REQUIRE(IS_IPV4(&ep->bcast));
 
 		/* Do we already have the broadcast address open? */
-		if (interf->flags & INT_BCASTOPEN) {
+		if (ep->flags & INT_BCASTOPEN) {
 			/*
 			 * account for already open interfaces to avoid
 			 * misleading warning below
@@ -2642,19 +2646,19 @@
 		/*
 		 * Try to open the broadcast address
 		 */
-		interf->family = AF_INET;
-		interf->bfd = open_socket(&interf->bcast, 1, 0, interf);
+		ep->family = AF_INET;
+		ep->bfd = open_socket(&ep->bcast, 1, 0, ep);
 
 		/*
 		 * If we succeeded then we use it otherwise enable
 		 * broadcast on the interface address
 		 */
-		if (interf->bfd != INVALID_SOCKET) {
+		if (ep->bfd != INVALID_SOCKET) {
 			nif++;
-			interf->flags |= INT_BCASTOPEN;
+			ep->flags |= INT_BCASTOPEN;
 			msyslog(LOG_INFO,
 				"Listen for broadcasts to %s on interface #%d %s",
-				stoa(&interf->bcast), interf->ifnum, interf->name);
+				stoa(&ep->bcast), ep->ifnum, ep->name);
 		} else switch (errno) {
 			/* Silently ignore EADDRINUSE as we probably
 			 * opened the socket already for an address in
@@ -2668,8 +2672,8 @@
 			 * regular socket, it's quite useless to try this
 			 * again.
 			 */
-			if (interf->fd != INVALID_SOCKET) {
-				interf->flags |= INT_BCASTOPEN;
+			if (ep->fd != INVALID_SOCKET) {
+				ep->flags |= INT_BCASTOPEN;
 				nif++;
 			}
 #		    endif
@@ -2678,7 +2682,7 @@
 		default:
 			msyslog(LOG_INFO,
 				"failed to listen for broadcasts to %s on interface #%d %s",
-				stoa(&interf->bcast), interf->ifnum, interf->name);
+				stoa(&ep->bcast), ep->ifnum, ep->name);
 			break;
 		}
 	}
@@ -2688,8 +2692,14 @@
 		DPRINTF(1, ("io_setbclient: listening to %d broadcast addresses\n", nif));
 	} else {
 		broadcast_client_enabled = ISC_FALSE;
-		msyslog(LOG_ERR,
-			"Unable to listen for broadcasts, no broadcast interfaces available");
+		/* This is expected when having only IPv6 interfaces
+		 * and no IPv4 interfaces at all. We suppress the error
+		 * log in that case... everything else should work!
+		 */
+		if (ni4 && !ni6) {
+			msyslog(LOG_ERR,
+				"Unable to listen for broadcasts, no broadcast interfaces available");
+		}
 	}
 #else
 	msyslog(LOG_ERR,
@@ -3134,7 +3144,8 @@
 	int	rc;
 	u_char	cttl;
 	l_fp	fp_zero = { { 0 }, 0 };
-
+	l_fp	org, rec, xmt;
+	
 	ismcast = IS_MCAST(dest);
 	if (!ismcast)
 		src = ep;
@@ -3219,11 +3230,14 @@
 	} while (ismcast && src != NULL);
 
 	/* HMS: pkt->rootdisp is usually random here */
+	NTOHL_FP(&pkt->org, &org);
+	NTOHL_FP(&pkt->rec, &rec);
+	NTOHL_FP(&pkt->xmt, &xmt);
 	record_raw_stats(src ? &src->sin : NULL, dest,
-			&pkt->org, &pkt->rec, &pkt->xmt, &fp_zero,
+			&org, &rec, &xmt, &fp_zero,
+			PKT_LEAP(pkt->li_vn_mode),
+			PKT_VERSION(pkt->li_vn_mode),
 			PKT_MODE(pkt->li_vn_mode),
-			PKT_VERSION(pkt->li_vn_mode),
-			PKT_LEAP(pkt->li_vn_mode),
 			pkt->stratum,
 			pkt->ppoll, pkt->precision,
 			pkt->rootdelay, pkt->rootdisp, pkt->refid,
--- contrib/ntp/ntpd/ntp_keyword.h.orig
+++ contrib/ntp/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
  * ntp_keyword.h
  * 
  * NOTE: edit this file with caution, it is generated by keyword-gen.c
- *	 Generated 2018-01-14 03:53:33 UTC	  diff_ignore_line
+ *	 Generated 2020-02-13 08:56:28 UTC	  diff_ignore_line
  *
  */
 #include "ntp_scanner.h"
@@ -10,7 +10,7 @@
 
 #define LOWEST_KEYWORD_ID 258
 
-const char * const keyword_text[200] = {
+const char * const keyword_text[209] = {
 	/* 0       258             T_Abbrev */	"abbrev",
 	/* 1       259                T_Age */	"age",
 	/* 2       260                T_All */	"all",
@@ -30,197 +30,206 @@
 	/* 16      274              T_Burst */	"burst",
 	/* 17      275          T_Calibrate */	"calibrate",
 	/* 18      276            T_Ceiling */	"ceiling",
-	/* 19      277         T_Clockstats */	"clockstats",
-	/* 20      278             T_Cohort */	"cohort",
-	/* 21      279         T_ControlKey */	"controlkey",
-	/* 22      280             T_Crypto */	"crypto",
-	/* 23      281        T_Cryptostats */	"cryptostats",
-	/* 24      282                T_Ctl */	"ctl",
-	/* 25      283                T_Day */	"day",
-	/* 26      284            T_Default */	"default",
-	/* 27      285             T_Digest */	"digest",
-	/* 28      286            T_Disable */	"disable",
-	/* 29      287            T_Discard */	"discard",
-	/* 30      288         T_Dispersion */	"dispersion",
-	/* 31      289             T_Double */	NULL,
-	/* 32      290          T_Driftfile */	"driftfile",
-	/* 33      291               T_Drop */	"drop",
-	/* 34      292               T_Dscp */	"dscp",
-	/* 35      293           T_Ellipsis */	"...",
-	/* 36      294             T_Enable */	"enable",
-	/* 37      295                T_End */	"end",
-	/* 38      296              T_Epeer */	"epeer",
-	/* 39      297              T_False */	NULL,
-	/* 40      298               T_File */	"file",
-	/* 41      299            T_Filegen */	"filegen",
-	/* 42      300            T_Filenum */	"filenum",
-	/* 43      301              T_Flag1 */	"flag1",
-	/* 44      302              T_Flag2 */	"flag2",
-	/* 45      303              T_Flag3 */	"flag3",
-	/* 46      304              T_Flag4 */	"flag4",
-	/* 47      305              T_Flake */	"flake",
-	/* 48      306              T_Floor */	"floor",
-	/* 49      307               T_Freq */	"freq",
-	/* 50      308              T_Fudge */	"fudge",
-	/* 51      309               T_Host */	"host",
-	/* 52      310           T_Huffpuff */	"huffpuff",
-	/* 53      311             T_Iburst */	"iburst",
-	/* 54      312              T_Ident */	"ident",
-	/* 55      313             T_Ignore */	"ignore",
-	/* 56      314           T_Incalloc */	"incalloc",
-	/* 57      315             T_Incmem */	"incmem",
-	/* 58      316          T_Initalloc */	"initalloc",
-	/* 59      317            T_Initmem */	"initmem",
-	/* 60      318        T_Includefile */	"includefile",
-	/* 61      319            T_Integer */	NULL,
-	/* 62      320          T_Interface */	"interface",
-	/* 63      321           T_Intrange */	NULL,
-	/* 64      322                 T_Io */	"io",
-	/* 65      323        T_Ippeerlimit */	"ippeerlimit",
-	/* 66      324               T_Ipv4 */	"ipv4",
-	/* 67      325          T_Ipv4_flag */	"-4",
-	/* 68      326               T_Ipv6 */	"ipv6",
-	/* 69      327          T_Ipv6_flag */	"-6",
-	/* 70      328             T_Kernel */	"kernel",
-	/* 71      329                T_Key */	"key",
-	/* 72      330               T_Keys */	"keys",
-	/* 73      331            T_Keysdir */	"keysdir",
-	/* 74      332                T_Kod */	"kod",
-	/* 75      333             T_Mssntp */	"mssntp",
-	/* 76      334           T_Leapfile */	"leapfile",
-	/* 77      335  T_Leapsmearinterval */	"leapsmearinterval",
-	/* 78      336            T_Limited */	"limited",
-	/* 79      337               T_Link */	"link",
-	/* 80      338             T_Listen */	"listen",
-	/* 81      339          T_Logconfig */	"logconfig",
-	/* 82      340            T_Logfile */	"logfile",
-	/* 83      341          T_Loopstats */	"loopstats",
-	/* 84      342        T_Lowpriotrap */	"lowpriotrap",
-	/* 85      343     T_Manycastclient */	"manycastclient",
-	/* 86      344     T_Manycastserver */	"manycastserver",
-	/* 87      345               T_Mask */	"mask",
-	/* 88      346             T_Maxage */	"maxage",
-	/* 89      347           T_Maxclock */	"maxclock",
-	/* 90      348           T_Maxdepth */	"maxdepth",
-	/* 91      349            T_Maxdist */	"maxdist",
-	/* 92      350             T_Maxmem */	"maxmem",
-	/* 93      351            T_Maxpoll */	"maxpoll",
-	/* 94      352          T_Mdnstries */	"mdnstries",
-	/* 95      353                T_Mem */	"mem",
-	/* 96      354            T_Memlock */	"memlock",
-	/* 97      355           T_Minclock */	"minclock",
-	/* 98      356           T_Mindepth */	"mindepth",
-	/* 99      357            T_Mindist */	"mindist",
-	/* 100     358            T_Minimum */	"minimum",
-	/* 101     359            T_Minpoll */	"minpoll",
-	/* 102     360            T_Minsane */	"minsane",
-	/* 103     361               T_Mode */	"mode",
-	/* 104     362              T_Mode7 */	"mode7",
-	/* 105     363            T_Monitor */	"monitor",
-	/* 106     364              T_Month */	"month",
-	/* 107     365                T_Mru */	"mru",
-	/* 108     366    T_Multicastclient */	"multicastclient",
-	/* 109     367                T_Nic */	"nic",
-	/* 110     368             T_Nolink */	"nolink",
-	/* 111     369           T_Nomodify */	"nomodify",
-	/* 112     370          T_Nomrulist */	"nomrulist",
-	/* 113     371               T_None */	"none",
-	/* 114     372        T_Nonvolatile */	"nonvolatile",
-	/* 115     373            T_Noepeer */	"noepeer",
-	/* 116     374             T_Nopeer */	"nopeer",
-	/* 117     375            T_Noquery */	"noquery",
-	/* 118     376           T_Noselect */	"noselect",
-	/* 119     377            T_Noserve */	"noserve",
-	/* 120     378             T_Notrap */	"notrap",
-	/* 121     379            T_Notrust */	"notrust",
-	/* 122     380                T_Ntp */	"ntp",
-	/* 123     381            T_Ntpport */	"ntpport",
-	/* 124     382     T_NtpSignDsocket */	"ntpsigndsocket",
-	/* 125     383             T_Orphan */	"orphan",
-	/* 126     384         T_Orphanwait */	"orphanwait",
-	/* 127     385          T_PCEdigest */	"peer_clear_digest_early",
-	/* 128     386              T_Panic */	"panic",
-	/* 129     387               T_Peer */	"peer",
-	/* 130     388          T_Peerstats */	"peerstats",
-	/* 131     389              T_Phone */	"phone",
-	/* 132     390                T_Pid */	"pid",
-	/* 133     391            T_Pidfile */	"pidfile",
-	/* 134     392               T_Pool */	"pool",
-	/* 135     393               T_Port */	"port",
-	/* 136     394            T_Preempt */	"preempt",
-	/* 137     395             T_Prefer */	"prefer",
-	/* 138     396         T_Protostats */	"protostats",
-	/* 139     397                 T_Pw */	"pw",
-	/* 140     398           T_Randfile */	"randfile",
-	/* 141     399           T_Rawstats */	"rawstats",
-	/* 142     400              T_Refid */	"refid",
-	/* 143     401         T_Requestkey */	"requestkey",
-	/* 144     402              T_Reset */	"reset",
-	/* 145     403           T_Restrict */	"restrict",
-	/* 146     404             T_Revoke */	"revoke",
-	/* 147     405             T_Rlimit */	"rlimit",
-	/* 148     406      T_Saveconfigdir */	"saveconfigdir",
-	/* 149     407             T_Server */	"server",
-	/* 150     408             T_Setvar */	"setvar",
-	/* 151     409             T_Source */	"source",
-	/* 152     410          T_Stacksize */	"stacksize",
-	/* 153     411         T_Statistics */	"statistics",
-	/* 154     412              T_Stats */	"stats",
-	/* 155     413           T_Statsdir */	"statsdir",
-	/* 156     414               T_Step */	"step",
-	/* 157     415           T_Stepback */	"stepback",
-	/* 158     416            T_Stepfwd */	"stepfwd",
-	/* 159     417            T_Stepout */	"stepout",
-	/* 160     418            T_Stratum */	"stratum",
-	/* 161     419             T_String */	NULL,
-	/* 162     420                T_Sys */	"sys",
-	/* 163     421           T_Sysstats */	"sysstats",
-	/* 164     422               T_Tick */	"tick",
-	/* 165     423              T_Time1 */	"time1",
-	/* 166     424              T_Time2 */	"time2",
-	/* 167     425              T_Timer */	"timer",
-	/* 168     426        T_Timingstats */	"timingstats",
-	/* 169     427             T_Tinker */	"tinker",
-	/* 170     428                T_Tos */	"tos",
-	/* 171     429               T_Trap */	"trap",
-	/* 172     430               T_True */	"true",
-	/* 173     431         T_Trustedkey */	"trustedkey",
-	/* 174     432                T_Ttl */	"ttl",
-	/* 175     433               T_Type */	"type",
-	/* 176     434              T_U_int */	NULL,
-	/* 177     435           T_UEcrypto */	"unpeer_crypto_early",
-	/* 178     436        T_UEcryptonak */	"unpeer_crypto_nak_early",
-	/* 179     437           T_UEdigest */	"unpeer_digest_early",
-	/* 180     438           T_Unconfig */	"unconfig",
-	/* 181     439             T_Unpeer */	"unpeer",
-	/* 182     440            T_Version */	"version",
-	/* 183     441    T_WanderThreshold */	NULL,
-	/* 184     442               T_Week */	"week",
-	/* 185     443           T_Wildcard */	"wildcard",
-	/* 186     444             T_Xleave */	"xleave",
-	/* 187     445               T_Year */	"year",
-	/* 188     446               T_Flag */	NULL,
-	/* 189     447                T_EOC */	NULL,
-	/* 190     448           T_Simulate */	"simulate",
-	/* 191     449         T_Beep_Delay */	"beep_delay",
-	/* 192     450       T_Sim_Duration */	"simulation_duration",
-	/* 193     451      T_Server_Offset */	"server_offset",
-	/* 194     452           T_Duration */	"duration",
-	/* 195     453        T_Freq_Offset */	"freq_offset",
-	/* 196     454             T_Wander */	"wander",
-	/* 197     455             T_Jitter */	"jitter",
-	/* 198     456         T_Prop_Delay */	"prop_delay",
-	/* 199     457         T_Proc_Delay */	"proc_delay"
+	/* 19      277          T_Checkhash */	"checkhash",
+	/* 20      278         T_Clockstats */	"clockstats",
+	/* 21      279             T_Cohort */	"cohort",
+	/* 22      280         T_ControlKey */	"controlkey",
+	/* 23      281             T_Crypto */	"crypto",
+	/* 24      282        T_Cryptostats */	"cryptostats",
+	/* 25      283                T_Ctl */	"ctl",
+	/* 26      284                T_Day */	"day",
+	/* 27      285            T_Default */	"default",
+	/* 28      286             T_Digest */	"digest",
+	/* 29      287            T_Disable */	"disable",
+	/* 30      288            T_Discard */	"discard",
+	/* 31      289         T_Dispersion */	"dispersion",
+	/* 32      290             T_Double */	NULL,
+	/* 33      291          T_Driftfile */	"driftfile",
+	/* 34      292               T_Drop */	"drop",
+	/* 35      293               T_Dscp */	"dscp",
+	/* 36      294           T_Ellipsis */	"...",
+	/* 37      295             T_Enable */	"enable",
+	/* 38      296                T_End */	"end",
+	/* 39      297              T_Epeer */	"epeer",
+	/* 40      298              T_False */	NULL,
+	/* 41      299               T_File */	"file",
+	/* 42      300            T_Filegen */	"filegen",
+	/* 43      301            T_Filenum */	"filenum",
+	/* 44      302              T_Flag1 */	"flag1",
+	/* 45      303              T_Flag2 */	"flag2",
+	/* 46      304              T_Flag3 */	"flag3",
+	/* 47      305              T_Flag4 */	"flag4",
+	/* 48      306              T_Flake */	"flake",
+	/* 49      307              T_Floor */	"floor",
+	/* 50      308               T_Freq */	"freq",
+	/* 51      309              T_Fudge */	"fudge",
+	/* 52      310               T_Fuzz */	"fuzz",
+	/* 53      311               T_Host */	"host",
+	/* 54      312           T_Huffpuff */	"huffpuff",
+	/* 55      313             T_Iburst */	"iburst",
+	/* 56      314              T_Ident */	"ident",
+	/* 57      315             T_Ignore */	"ignore",
+	/* 58      316         T_Ignorehash */	"ignorehash",
+	/* 59      317           T_Incalloc */	"incalloc",
+	/* 60      318             T_Incmem */	"incmem",
+	/* 61      319          T_Initalloc */	"initalloc",
+	/* 62      320            T_Initmem */	"initmem",
+	/* 63      321        T_Includefile */	"includefile",
+	/* 64      322            T_Integer */	NULL,
+	/* 65      323          T_Interface */	"interface",
+	/* 66      324           T_Intrange */	NULL,
+	/* 67      325                 T_Io */	"io",
+	/* 68      326        T_Ippeerlimit */	"ippeerlimit",
+	/* 69      327               T_Ipv4 */	"ipv4",
+	/* 70      328          T_Ipv4_flag */	"-4",
+	/* 71      329               T_Ipv6 */	"ipv6",
+	/* 72      330          T_Ipv6_flag */	"-6",
+	/* 73      331             T_Kernel */	"kernel",
+	/* 74      332                T_Key */	"key",
+	/* 75      333               T_Keys */	"keys",
+	/* 76      334            T_Keysdir */	"keysdir",
+	/* 77      335                T_Kod */	"kod",
+	/* 78      336           T_Leapfile */	"leapfile",
+	/* 79      337  T_Leapsmearinterval */	"leapsmearinterval",
+	/* 80      338            T_Limited */	"limited",
+	/* 81      339               T_Link */	"link",
+	/* 82      340             T_Listen */	"listen",
+	/* 83      341          T_Logconfig */	"logconfig",
+	/* 84      342            T_Logfile */	"logfile",
+	/* 85      343          T_Loopstats */	"loopstats",
+	/* 86      344        T_Lowpriotrap */	"lowpriotrap",
+	/* 87      345     T_Manycastclient */	"manycastclient",
+	/* 88      346     T_Manycastserver */	"manycastserver",
+	/* 89      347               T_Mask */	"mask",
+	/* 90      348             T_Maxage */	"maxage",
+	/* 91      349           T_Maxclock */	"maxclock",
+	/* 92      350           T_Maxdepth */	"maxdepth",
+	/* 93      351            T_Maxdist */	"maxdist",
+	/* 94      352             T_Maxmem */	"maxmem",
+	/* 95      353            T_Maxpoll */	"maxpoll",
+	/* 96      354          T_Mdnstries */	"mdnstries",
+	/* 97      355                T_Mem */	"mem",
+	/* 98      356            T_Memlock */	"memlock",
+	/* 99      357           T_Minclock */	"minclock",
+	/* 100     358           T_Mindepth */	"mindepth",
+	/* 101     359            T_Mindist */	"mindist",
+	/* 102     360            T_Minimum */	"minimum",
+	/* 103     361          T_Minjitter */	"minjitter",
+	/* 104     362            T_Minpoll */	"minpoll",
+	/* 105     363            T_Minsane */	"minsane",
+	/* 106     364               T_Mode */	"mode",
+	/* 107     365              T_Mode7 */	"mode7",
+	/* 108     366            T_Monitor */	"monitor",
+	/* 109     367              T_Month */	"month",
+	/* 110     368                T_Mru */	"mru",
+	/* 111     369             T_Mssntp */	"mssntp",
+	/* 112     370    T_Multicastclient */	"multicastclient",
+	/* 113     371                T_Nic */	"nic",
+	/* 114     372             T_Nolink */	"nolink",
+	/* 115     373           T_Nomodify */	"nomodify",
+	/* 116     374          T_Nomrulist */	"nomrulist",
+	/* 117     375               T_None */	"none",
+	/* 118     376        T_Nonvolatile */	"nonvolatile",
+	/* 119     377            T_Noepeer */	"noepeer",
+	/* 120     378             T_Nopeer */	"nopeer",
+	/* 121     379            T_Noquery */	"noquery",
+	/* 122     380           T_Noselect */	"noselect",
+	/* 123     381            T_Noserve */	"noserve",
+	/* 124     382             T_Notrap */	"notrap",
+	/* 125     383            T_Notrust */	"notrust",
+	/* 126     384                T_Ntp */	"ntp",
+	/* 127     385            T_Ntpport */	"ntpport",
+	/* 128     386     T_NtpSignDsocket */	"ntpsigndsocket",
+	/* 129     387             T_Orphan */	"orphan",
+	/* 130     388         T_Orphanwait */	"orphanwait",
+	/* 131     389          T_PCEdigest */	"peer_clear_digest_early",
+	/* 132     390              T_Panic */	"panic",
+	/* 133     391               T_Peer */	"peer",
+	/* 134     392          T_Peerstats */	"peerstats",
+	/* 135     393              T_Phone */	"phone",
+	/* 136     394                T_Pid */	"pid",
+	/* 137     395            T_Pidfile */	"pidfile",
+	/* 138     396               T_Poll */	"poll",
+	/* 139     397       T_PollSkewList */	"pollskewlist",
+	/* 140     398               T_Pool */	"pool",
+	/* 141     399               T_Port */	"port",
+	/* 142     400            T_Preempt */	"preempt",
+	/* 143     401             T_Prefer */	"prefer",
+	/* 144     402         T_Protostats */	"protostats",
+	/* 145     403                 T_Pw */	"pw",
+	/* 146     404           T_Randfile */	"randfile",
+	/* 147     405           T_Rawstats */	"rawstats",
+	/* 148     406              T_Refid */	"refid",
+	/* 149     407         T_Requestkey */	"requestkey",
+	/* 150     408              T_Reset */	"reset",
+	/* 151     409           T_Restrict */	"restrict",
+	/* 152     410             T_Revoke */	"revoke",
+	/* 153     411             T_Rlimit */	"rlimit",
+	/* 154     412      T_Saveconfigdir */	"saveconfigdir",
+	/* 155     413             T_Server */	"server",
+	/* 156     414     T_Serverresponse */	"serverresponse",
+	/* 157     415 T_ServerresponseFuzz */	NULL,
+	/* 158     416             T_Setvar */	"setvar",
+	/* 159     417             T_Source */	"source",
+	/* 160     418          T_Stacksize */	"stacksize",
+	/* 161     419         T_Statistics */	"statistics",
+	/* 162     420              T_Stats */	"stats",
+	/* 163     421           T_Statsdir */	"statsdir",
+	/* 164     422               T_Step */	"step",
+	/* 165     423           T_Stepback */	"stepback",
+	/* 166     424            T_Stepfwd */	"stepfwd",
+	/* 167     425            T_Stepout */	"stepout",
+	/* 168     426            T_Stratum */	"stratum",
+	/* 169     427             T_String */	NULL,
+	/* 170     428                T_Sys */	"sys",
+	/* 171     429           T_Sysstats */	"sysstats",
+	/* 172     430               T_Tick */	"tick",
+	/* 173     431              T_Time1 */	"time1",
+	/* 174     432              T_Time2 */	"time2",
+	/* 175     433              T_Timer */	"timer",
+	/* 176     434        T_Timingstats */	"timingstats",
+	/* 177     435             T_Tinker */	"tinker",
+	/* 178     436                T_Tos */	"tos",
+	/* 179     437               T_Trap */	"trap",
+	/* 180     438               T_True */	"true",
+	/* 181     439         T_Trustedkey */	"trustedkey",
+	/* 182     440                T_Ttl */	"ttl",
+	/* 183     441               T_Type */	"type",
+	/* 184     442              T_U_int */	NULL,
+	/* 185     443           T_UEcrypto */	"unpeer_crypto_early",
+	/* 186     444        T_UEcryptonak */	"unpeer_crypto_nak_early",
+	/* 187     445           T_UEdigest */	"unpeer_digest_early",
+	/* 188     446           T_Unconfig */	"unconfig",
+	/* 189     447             T_Unpeer */	"unpeer",
+	/* 190     448            T_Version */	"version",
+	/* 191     449    T_WanderThreshold */	NULL,
+	/* 192     450               T_Week */	"week",
+	/* 193     451           T_Wildcard */	"wildcard",
+	/* 194     452             T_Xleave */	"xleave",
+	/* 195     453           T_Xmtnonce */	"xmtnonce",
+	/* 196     454               T_Year */	"year",
+	/* 197     455               T_Flag */	NULL,
+	/* 198     456                T_EOC */	NULL,
+	/* 199     457           T_Simulate */	"simulate",
+	/* 200     458         T_Beep_Delay */	"beep_delay",
+	/* 201     459       T_Sim_Duration */	"simulation_duration",
+	/* 202     460      T_Server_Offset */	"server_offset",
+	/* 203     461           T_Duration */	"duration",
+	/* 204     462        T_Freq_Offset */	"freq_offset",
+	/* 205     463             T_Wander */	"wander",
+	/* 206     464             T_Jitter */	"jitter",
+	/* 207     465         T_Prop_Delay */	"prop_delay",
+	/* 208     466         T_Proc_Delay */	"proc_delay"
 };
 
-#define SCANNER_INIT_S 940
+#define SCANNER_INIT_S 985
 
-const scan_state sst[943] = {
+const scan_state sst[988] = {
 /*SS_T( ch,	f-by, match, other ),				 */
   0,				      /*     0                   */
-  S_ST( '-',	3,      327,     0 ), /*     1                   */
+  S_ST( '-',	3,      330,     0 ), /*     1                   */
   S_ST( '.',	3,        3,     1 ), /*     2                   */
-  S_ST( '.',	3,      293,     0 ), /*     3 .                 */
+  S_ST( '.',	3,      294,     0 ), /*     3 .                 */
   S_ST( 'a',	3,       23,     2 ), /*     4                   */
   S_ST( 'b',	3,        6,     0 ), /*     5 a                 */
   S_ST( 'b',	3,        7,     0 ), /*     6 ab                */
@@ -275,7 +284,7 @@
   S_ST( 'd',	3,       56,     0 ), /*    55 beep_             */
   S_ST( 'e',	3,       57,     0 ), /*    56 beep_d            */
   S_ST( 'l',	3,       58,     0 ), /*    57 beep_de           */
-  S_ST( 'a',	3,      449,     0 ), /*    58 beep_del          */
+  S_ST( 'a',	3,      458,     0 ), /*    58 beep_del          */
   S_ST( 'r',	3,       60,    48 ), /*    59 b                 */
   S_ST( 'o',	3,       61,     0 ), /*    60 br                */
   S_ST( 'a',	3,       62,     0 ), /*    61 bro               */
@@ -295,7 +304,7 @@
   S_ST( 'u',	3,       76,    59 ), /*    75 b                 */
   S_ST( 'r',	3,       77,     0 ), /*    76 bu                */
   S_ST( 's',	3,      274,     0 ), /*    77 bur               */
-  S_ST( 'c',	3,      118,    28 ), /*    78                   */
+  S_ST( 'c',	3,      125,    28 ), /*    78                   */
   S_ST( 'a',	3,       80,     0 ), /*    79 c                 */
   S_ST( 'l',	3,       81,     0 ), /*    80 ca                */
   S_ST( 'i',	3,       82,     0 ), /*    81 cal               */
@@ -308,173 +317,173 @@
   S_ST( 'l',	3,       89,     0 ), /*    88 cei               */
   S_ST( 'i',	3,       90,     0 ), /*    89 ceil              */
   S_ST( 'n',	3,      276,     0 ), /*    90 ceili             */
-  S_ST( 'l',	3,       92,    86 ), /*    91 c                 */
-  S_ST( 'o',	3,       93,     0 ), /*    92 cl                */
-  S_ST( 'c',	3,       94,     0 ), /*    93 clo               */
-  S_ST( 'k',	3,       95,     0 ), /*    94 cloc              */
-  S_ST( 's',	3,       96,     0 ), /*    95 clock             */
-  S_ST( 't',	3,       97,     0 ), /*    96 clocks            */
-  S_ST( 'a',	3,       98,     0 ), /*    97 clockst           */
-  S_ST( 't',	3,      277,     0 ), /*    98 clocksta          */
-  S_ST( 'o',	3,      103,    91 ), /*    99 c                 */
-  S_ST( 'h',	3,      101,     0 ), /*   100 co                */
-  S_ST( 'o',	3,      102,     0 ), /*   101 coh               */
-  S_ST( 'r',	3,      278,     0 ), /*   102 coho              */
-  S_ST( 'n',	3,      104,   100 ), /*   103 co                */
-  S_ST( 't',	3,      105,     0 ), /*   104 con               */
-  S_ST( 'r',	3,      106,     0 ), /*   105 cont              */
-  S_ST( 'o',	3,      107,     0 ), /*   106 contr             */
-  S_ST( 'l',	3,      108,     0 ), /*   107 contro            */
-  S_ST( 'k',	3,      109,     0 ), /*   108 control           */
-  S_ST( 'e',	3,      279,     0 ), /*   109 controlk          */
-  S_ST( 'r',	3,      111,    99 ), /*   110 c                 */
-  S_ST( 'y',	3,      112,     0 ), /*   111 cr                */
-  S_ST( 'p',	3,      113,     0 ), /*   112 cry               */
-  S_ST( 't',	3,      280,     0 ), /*   113 cryp              */
-  S_ST( 's',	3,      115,     0 ), /*   114 crypto            */
-  S_ST( 't',	3,      116,     0 ), /*   115 cryptos           */
-  S_ST( 'a',	3,      117,     0 ), /*   116 cryptost          */
-  S_ST( 't',	3,      281,     0 ), /*   117 cryptosta         */
-  S_ST( 't',	3,      282,   110 ), /*   118 c                 */
-  S_ST( 'd',	3,      153,    78 ), /*   119                   */
-  S_ST( 'a',	3,      283,     0 ), /*   120 d                 */
-  S_ST( 'e',	3,      122,   120 ), /*   121 d                 */
-  S_ST( 'f',	3,      123,     0 ), /*   122 de                */
-  S_ST( 'a',	3,      124,     0 ), /*   123 def               */
-  S_ST( 'u',	3,      125,     0 ), /*   124 defa              */
-  S_ST( 'l',	3,      284,     0 ), /*   125 defau             */
-  S_ST( 'i',	3,      130,   121 ), /*   126 d                 */
-  S_ST( 'g',	3,      128,     0 ), /*   127 di                */
-  S_ST( 'e',	3,      129,     0 ), /*   128 dig               */
-  S_ST( 's',	3,      285,     0 ), /*   129 dige              */
-  S_ST( 's',	3,      137,   127 ), /*   130 di                */
-  S_ST( 'a',	3,      132,     0 ), /*   131 dis               */
-  S_ST( 'b',	3,      133,     0 ), /*   132 disa              */
-  S_ST( 'l',	3,      286,     0 ), /*   133 disab             */
-  S_ST( 'c',	3,      135,   131 ), /*   134 dis               */
-  S_ST( 'a',	3,      136,     0 ), /*   135 disc              */
-  S_ST( 'r',	3,      287,     0 ), /*   136 disca             */
-  S_ST( 'p',	3,      138,   134 ), /*   137 dis               */
-  S_ST( 'e',	3,      139,     0 ), /*   138 disp              */
-  S_ST( 'r',	3,      140,     0 ), /*   139 dispe             */
-  S_ST( 's',	3,      141,     0 ), /*   140 disper            */
-  S_ST( 'i',	3,      142,     0 ), /*   141 dispers           */
-  S_ST( 'o',	3,      288,     0 ), /*   142 dispersi          */
-  S_ST( 'r',	3,      150,   126 ), /*   143 d                 */
-  S_ST( 'i',	3,      145,     0 ), /*   144 dr                */
-  S_ST( 'f',	3,      146,     0 ), /*   145 dri               */
-  S_ST( 't',	3,      147,     0 ), /*   146 drif              */
-  S_ST( 'f',	3,      148,     0 ), /*   147 drift             */
-  S_ST( 'i',	3,      149,     0 ), /*   148 driftf            */
-  S_ST( 'l',	3,      290,     0 ), /*   149 driftfi           */
-  S_ST( 'o',	3,      291,   144 ), /*   150 dr                */
-  S_ST( 's',	3,      152,   143 ), /*   151 d                 */
-  S_ST( 'c',	3,      292,     0 ), /*   152 ds                */
-  S_ST( 'u',	3,      154,   151 ), /*   153 d                 */
-  S_ST( 'r',	3,      155,     0 ), /*   154 du                */
-  S_ST( 'a',	3,      156,     0 ), /*   155 dur               */
-  S_ST( 't',	3,      157,     0 ), /*   156 dura              */
-  S_ST( 'i',	3,      158,     0 ), /*   157 durat             */
-  S_ST( 'o',	3,      452,     0 ), /*   158 durati            */
-  S_ST( 'e',	3,      164,   119 ), /*   159                   */
-  S_ST( 'n',	3,      295,     0 ), /*   160 e                 */
-  S_ST( 'a',	3,      162,     0 ), /*   161 en                */
-  S_ST( 'b',	3,      163,     0 ), /*   162 ena               */
-  S_ST( 'l',	3,      294,     0 ), /*   163 enab              */
-  S_ST( 'p',	3,      165,   160 ), /*   164 e                 */
-  S_ST( 'e',	3,      166,     0 ), /*   165 ep                */
-  S_ST( 'e',	3,      296,     0 ), /*   166 epe               */
-  S_ST( 'f',	3,      188,   159 ), /*   167                   */
-  S_ST( 'i',	3,      169,     0 ), /*   168 f                 */
-  S_ST( 'l',	3,      298,     0 ), /*   169 fi                */
-  S_ST( 'g',	3,      171,     0 ), /*   170 file              */
-  S_ST( 'e',	3,      299,     0 ), /*   171 fileg             */
-  S_ST( 'n',	3,      173,   170 ), /*   172 file              */
-  S_ST( 'u',	3,      300,     0 ), /*   173 filen             */
-  S_ST( 'l',	3,      178,   168 ), /*   174 f                 */
-  S_ST( 'a',	3,      177,     0 ), /*   175 fl                */
-  S_ST( 'g',	3,      304,     0 ), /*   176 fla               */
-  S_ST( 'k',	3,      305,   176 ), /*   177 fla               */
-  S_ST( 'o',	3,      179,   175 ), /*   178 fl                */
-  S_ST( 'o',	3,      306,     0 ), /*   179 flo               */
-  S_ST( 'r',	3,      181,   174 ), /*   180 f                 */
-  S_ST( 'e',	3,      307,     0 ), /*   181 fr                */
-  S_ST( '_',	3,      183,     0 ), /*   182 freq              */
-  S_ST( 'o',	3,      184,     0 ), /*   183 freq_             */
-  S_ST( 'f',	3,      185,     0 ), /*   184 freq_o            */
-  S_ST( 'f',	3,      186,     0 ), /*   185 freq_of           */
-  S_ST( 's',	3,      187,     0 ), /*   186 freq_off          */
-  S_ST( 'e',	3,      453,     0 ), /*   187 freq_offs         */
-  S_ST( 'u',	3,      189,   180 ), /*   188 f                 */
-  S_ST( 'd',	3,      190,     0 ), /*   189 fu                */
-  S_ST( 'g',	3,      308,     0 ), /*   190 fud               */
-  S_ST( 'h',	3,      194,   167 ), /*   191                   */
-  S_ST( 'o',	3,      193,     0 ), /*   192 h                 */
-  S_ST( 's',	3,      309,     0 ), /*   193 ho                */
-  S_ST( 'u',	3,      195,   192 ), /*   194 h                 */
-  S_ST( 'f',	3,      196,     0 ), /*   195 hu                */
-  S_ST( 'f',	3,      197,     0 ), /*   196 huf               */
-  S_ST( 'p',	3,      198,     0 ), /*   197 huff              */
-  S_ST( 'u',	3,      199,     0 ), /*   198 huffp             */
-  S_ST( 'f',	3,      310,     0 ), /*   199 huffpu            */
-  S_ST( 'i',	3,      241,   191 ), /*   200                   */
-  S_ST( 'b',	3,      202,     0 ), /*   201 i                 */
-  S_ST( 'u',	3,      203,     0 ), /*   202 ib                */
-  S_ST( 'r',	3,      204,     0 ), /*   203 ibu               */
-  S_ST( 's',	3,      311,     0 ), /*   204 ibur              */
-  S_ST( 'd',	3,      206,   201 ), /*   205 i                 */
-  S_ST( 'e',	3,      207,     0 ), /*   206 id                */
-  S_ST( 'n',	3,      312,     0 ), /*   207 ide               */
-  S_ST( 'g',	3,      209,   205 ), /*   208 i                 */
-  S_ST( 'n',	3,      210,     0 ), /*   209 ig                */
-  S_ST( 'o',	3,      211,     0 ), /*   210 ign               */
-  S_ST( 'r',	3,      313,     0 ), /*   211 igno              */
-  S_ST( 'n',	3,      235,   208 ), /*   212 i                 */
-  S_ST( 'c',	3,      225,     0 ), /*   213 in                */
-  S_ST( 'a',	3,      215,     0 ), /*   214 inc               */
-  S_ST( 'l',	3,      216,     0 ), /*   215 inca              */
-  S_ST( 'l',	3,      217,     0 ), /*   216 incal             */
-  S_ST( 'o',	3,      314,     0 ), /*   217 incall            */
-  S_ST( 'l',	3,      219,   214 ), /*   218 inc               */
-  S_ST( 'u',	3,      220,     0 ), /*   219 incl              */
-  S_ST( 'd',	3,      221,     0 ), /*   220 inclu             */
-  S_ST( 'e',	3,      222,     0 ), /*   221 includ            */
-  S_ST( 'f',	3,      223,     0 ), /*   222 include           */
-  S_ST( 'i',	3,      224,     0 ), /*   223 includef          */
-  S_ST( 'l',	3,      318,     0 ), /*   224 includefi         */
-  S_ST( 'm',	3,      226,   218 ), /*   225 inc               */
-  S_ST( 'e',	3,      315,     0 ), /*   226 incm              */
-  S_ST( 'i',	3,      228,   213 ), /*   227 in                */
-  S_ST( 't',	3,      233,     0 ), /*   228 ini               */
-  S_ST( 'a',	3,      230,     0 ), /*   229 init              */
-  S_ST( 'l',	3,      231,     0 ), /*   230 inita             */
-  S_ST( 'l',	3,      232,     0 ), /*   231 inital            */
-  S_ST( 'o',	3,      316,     0 ), /*   232 initall           */
-  S_ST( 'm',	3,      234,   229 ), /*   233 init              */
-  S_ST( 'e',	3,      317,     0 ), /*   234 initm             */
-  S_ST( 't',	3,      236,   227 ), /*   235 in                */
-  S_ST( 'e',	3,      237,     0 ), /*   236 int               */
-  S_ST( 'r',	3,      238,     0 ), /*   237 inte              */
-  S_ST( 'f',	3,      239,     0 ), /*   238 inter             */
-  S_ST( 'a',	3,      240,     0 ), /*   239 interf            */
-  S_ST( 'c',	3,      320,     0 ), /*   240 interfa           */
-  S_ST( 'p',	3,      250,   322 ), /*   241 i                 */
-  S_ST( 'p',	3,      243,     0 ), /*   242 ip                */
-  S_ST( 'e',	3,      244,     0 ), /*   243 ipp               */
-  S_ST( 'e',	3,      245,     0 ), /*   244 ippe              */
-  S_ST( 'r',	3,      246,     0 ), /*   245 ippee             */
-  S_ST( 'l',	3,      247,     0 ), /*   246 ippeer            */
-  S_ST( 'i',	3,      248,     0 ), /*   247 ippeerl           */
-  S_ST( 'm',	3,      249,     0 ), /*   248 ippeerli          */
-  S_ST( 'i',	3,      323,     0 ), /*   249 ippeerlim         */
-  S_ST( 'v',	3,      326,   242 ), /*   250 ip                */
-  S_ST( 'j',	3,      252,   200 ), /*   251                   */
-  S_ST( 'i',	3,      253,     0 ), /*   252 j                 */
-  S_ST( 't',	3,      254,     0 ), /*   253 ji                */
-  S_ST( 't',	3,      255,     0 ), /*   254 jit               */
-  S_ST( 'e',	3,      455,     0 ), /*   255 jitt              */
-  S_ST( 'k',	3,      434,   251 ), /*   256                   */
-  S_ST( 'e',	3,      329,     0 ), /*   257 k                 */
+  S_ST( 'h',	3,       92,    86 ), /*    91 c                 */
+  S_ST( 'e',	3,       93,     0 ), /*    92 ch                */
+  S_ST( 'c',	3,       94,     0 ), /*    93 che               */
+  S_ST( 'k',	3,       95,     0 ), /*    94 chec              */
+  S_ST( 'h',	3,       96,     0 ), /*    95 check             */
+  S_ST( 'a',	3,       97,     0 ), /*    96 checkh            */
+  S_ST( 's',	3,      277,     0 ), /*    97 checkha           */
+  S_ST( 'l',	3,       99,    91 ), /*    98 c                 */
+  S_ST( 'o',	3,      100,     0 ), /*    99 cl                */
+  S_ST( 'c',	3,      101,     0 ), /*   100 clo               */
+  S_ST( 'k',	3,      102,     0 ), /*   101 cloc              */
+  S_ST( 's',	3,      103,     0 ), /*   102 clock             */
+  S_ST( 't',	3,      104,     0 ), /*   103 clocks            */
+  S_ST( 'a',	3,      105,     0 ), /*   104 clockst           */
+  S_ST( 't',	3,      278,     0 ), /*   105 clocksta          */
+  S_ST( 'o',	3,      110,    98 ), /*   106 c                 */
+  S_ST( 'h',	3,      108,     0 ), /*   107 co                */
+  S_ST( 'o',	3,      109,     0 ), /*   108 coh               */
+  S_ST( 'r',	3,      279,     0 ), /*   109 coho              */
+  S_ST( 'n',	3,      111,   107 ), /*   110 co                */
+  S_ST( 't',	3,      112,     0 ), /*   111 con               */
+  S_ST( 'r',	3,      113,     0 ), /*   112 cont              */
+  S_ST( 'o',	3,      114,     0 ), /*   113 contr             */
+  S_ST( 'l',	3,      115,     0 ), /*   114 contro            */
+  S_ST( 'k',	3,      116,     0 ), /*   115 control           */
+  S_ST( 'e',	3,      280,     0 ), /*   116 controlk          */
+  S_ST( 'r',	3,      118,   106 ), /*   117 c                 */
+  S_ST( 'y',	3,      119,     0 ), /*   118 cr                */
+  S_ST( 'p',	3,      120,     0 ), /*   119 cry               */
+  S_ST( 't',	3,      281,     0 ), /*   120 cryp              */
+  S_ST( 's',	3,      122,     0 ), /*   121 crypto            */
+  S_ST( 't',	3,      123,     0 ), /*   122 cryptos           */
+  S_ST( 'a',	3,      124,     0 ), /*   123 cryptost          */
+  S_ST( 't',	3,      282,     0 ), /*   124 cryptosta         */
+  S_ST( 't',	3,      283,   117 ), /*   125 c                 */
+  S_ST( 'd',	3,      160,    78 ), /*   126                   */
+  S_ST( 'a',	3,      284,     0 ), /*   127 d                 */
+  S_ST( 'e',	3,      129,   127 ), /*   128 d                 */
+  S_ST( 'f',	3,      130,     0 ), /*   129 de                */
+  S_ST( 'a',	3,      131,     0 ), /*   130 def               */
+  S_ST( 'u',	3,      132,     0 ), /*   131 defa              */
+  S_ST( 'l',	3,      285,     0 ), /*   132 defau             */
+  S_ST( 'i',	3,      137,   128 ), /*   133 d                 */
+  S_ST( 'g',	3,      135,     0 ), /*   134 di                */
+  S_ST( 'e',	3,      136,     0 ), /*   135 dig               */
+  S_ST( 's',	3,      286,     0 ), /*   136 dige              */
+  S_ST( 's',	3,      144,   134 ), /*   137 di                */
+  S_ST( 'a',	3,      139,     0 ), /*   138 dis               */
+  S_ST( 'b',	3,      140,     0 ), /*   139 disa              */
+  S_ST( 'l',	3,      287,     0 ), /*   140 disab             */
+  S_ST( 'c',	3,      142,   138 ), /*   141 dis               */
+  S_ST( 'a',	3,      143,     0 ), /*   142 disc              */
+  S_ST( 'r',	3,      288,     0 ), /*   143 disca             */
+  S_ST( 'p',	3,      145,   141 ), /*   144 dis               */
+  S_ST( 'e',	3,      146,     0 ), /*   145 disp              */
+  S_ST( 'r',	3,      147,     0 ), /*   146 dispe             */
+  S_ST( 's',	3,      148,     0 ), /*   147 disper            */
+  S_ST( 'i',	3,      149,     0 ), /*   148 dispers           */
+  S_ST( 'o',	3,      289,     0 ), /*   149 dispersi          */
+  S_ST( 'r',	3,      157,   133 ), /*   150 d                 */
+  S_ST( 'i',	3,      152,     0 ), /*   151 dr                */
+  S_ST( 'f',	3,      153,     0 ), /*   152 dri               */
+  S_ST( 't',	3,      154,     0 ), /*   153 drif              */
+  S_ST( 'f',	3,      155,     0 ), /*   154 drift             */
+  S_ST( 'i',	3,      156,     0 ), /*   155 driftf            */
+  S_ST( 'l',	3,      291,     0 ), /*   156 driftfi           */
+  S_ST( 'o',	3,      292,   151 ), /*   157 dr                */
+  S_ST( 's',	3,      159,   150 ), /*   158 d                 */
+  S_ST( 'c',	3,      293,     0 ), /*   159 ds                */
+  S_ST( 'u',	3,      161,   158 ), /*   160 d                 */
+  S_ST( 'r',	3,      162,     0 ), /*   161 du                */
+  S_ST( 'a',	3,      163,     0 ), /*   162 dur               */
+  S_ST( 't',	3,      164,     0 ), /*   163 dura              */
+  S_ST( 'i',	3,      165,     0 ), /*   164 durat             */
+  S_ST( 'o',	3,      461,     0 ), /*   165 durati            */
+  S_ST( 'e',	3,      171,   126 ), /*   166                   */
+  S_ST( 'n',	3,      296,     0 ), /*   167 e                 */
+  S_ST( 'a',	3,      169,     0 ), /*   168 en                */
+  S_ST( 'b',	3,      170,     0 ), /*   169 ena               */
+  S_ST( 'l',	3,      295,     0 ), /*   170 enab              */
+  S_ST( 'p',	3,      172,   167 ), /*   171 e                 */
+  S_ST( 'e',	3,      173,     0 ), /*   172 ep                */
+  S_ST( 'e',	3,      297,     0 ), /*   173 epe               */
+  S_ST( 'f',	3,      195,   166 ), /*   174                   */
+  S_ST( 'i',	3,      176,     0 ), /*   175 f                 */
+  S_ST( 'l',	3,      299,     0 ), /*   176 fi                */
+  S_ST( 'g',	3,      178,     0 ), /*   177 file              */
+  S_ST( 'e',	3,      300,     0 ), /*   178 fileg             */
+  S_ST( 'n',	3,      180,   177 ), /*   179 file              */
+  S_ST( 'u',	3,      301,     0 ), /*   180 filen             */
+  S_ST( 'l',	3,      185,   175 ), /*   181 f                 */
+  S_ST( 'a',	3,      184,     0 ), /*   182 fl                */
+  S_ST( 'g',	3,      305,     0 ), /*   183 fla               */
+  S_ST( 'k',	3,      306,   183 ), /*   184 fla               */
+  S_ST( 'o',	3,      186,   182 ), /*   185 fl                */
+  S_ST( 'o',	3,      307,     0 ), /*   186 flo               */
+  S_ST( 'r',	3,      188,   181 ), /*   187 f                 */
+  S_ST( 'e',	3,      308,     0 ), /*   188 fr                */
+  S_ST( '_',	3,      190,     0 ), /*   189 freq              */
+  S_ST( 'o',	3,      191,     0 ), /*   190 freq_             */
+  S_ST( 'f',	3,      192,     0 ), /*   191 freq_o            */
+  S_ST( 'f',	3,      193,     0 ), /*   192 freq_of           */
+  S_ST( 's',	3,      194,     0 ), /*   193 freq_off          */
+  S_ST( 'e',	3,      462,     0 ), /*   194 freq_offs         */
+  S_ST( 'u',	3,      198,   187 ), /*   195 f                 */
+  S_ST( 'd',	3,      197,     0 ), /*   196 fu                */
+  S_ST( 'g',	3,      309,     0 ), /*   197 fud               */
+  S_ST( 'z',	3,      310,   196 ), /*   198 fu                */
+  S_ST( 'h',	3,      202,   174 ), /*   199                   */
+  S_ST( 'o',	3,      201,     0 ), /*   200 h                 */
+  S_ST( 's',	3,      311,     0 ), /*   201 ho                */
+  S_ST( 'u',	3,      203,   200 ), /*   202 h                 */
+  S_ST( 'f',	3,      204,     0 ), /*   203 hu                */
+  S_ST( 'f',	3,      205,     0 ), /*   204 huf               */
+  S_ST( 'p',	3,      206,     0 ), /*   205 huff              */
+  S_ST( 'u',	3,      207,     0 ), /*   206 huffp             */
+  S_ST( 'f',	3,      312,     0 ), /*   207 huffpu            */
+  S_ST( 'i',	3,      252,   199 ), /*   208                   */
+  S_ST( 'b',	3,      210,     0 ), /*   209 i                 */
+  S_ST( 'u',	3,      211,     0 ), /*   210 ib                */
+  S_ST( 'r',	3,      212,     0 ), /*   211 ibu               */
+  S_ST( 's',	3,      313,     0 ), /*   212 ibur              */
+  S_ST( 'd',	3,      214,   209 ), /*   213 i                 */
+  S_ST( 'e',	3,      215,     0 ), /*   214 id                */
+  S_ST( 'n',	3,      314,     0 ), /*   215 ide               */
+  S_ST( 'g',	3,      217,   213 ), /*   216 i                 */
+  S_ST( 'n',	3,      218,     0 ), /*   217 ig                */
+  S_ST( 'o',	3,      219,     0 ), /*   218 ign               */
+  S_ST( 'r',	3,      315,     0 ), /*   219 igno              */
+  S_ST( 'h',	3,      221,     0 ), /*   220 ignore            */
+  S_ST( 'a',	3,      222,     0 ), /*   221 ignoreh           */
+  S_ST( 's',	3,      316,     0 ), /*   222 ignoreha          */
+  S_ST( 'n',	3,      246,   216 ), /*   223 i                 */
+  S_ST( 'c',	3,      236,     0 ), /*   224 in                */
+  S_ST( 'a',	3,      226,     0 ), /*   225 inc               */
+  S_ST( 'l',	3,      227,     0 ), /*   226 inca              */
+  S_ST( 'l',	3,      228,     0 ), /*   227 incal             */
+  S_ST( 'o',	3,      317,     0 ), /*   228 incall            */
+  S_ST( 'l',	3,      230,   225 ), /*   229 inc               */
+  S_ST( 'u',	3,      231,     0 ), /*   230 incl              */
+  S_ST( 'd',	3,      232,     0 ), /*   231 inclu             */
+  S_ST( 'e',	3,      233,     0 ), /*   232 includ            */
+  S_ST( 'f',	3,      234,     0 ), /*   233 include           */
+  S_ST( 'i',	3,      235,     0 ), /*   234 includef          */
+  S_ST( 'l',	3,      321,     0 ), /*   235 includefi         */
+  S_ST( 'm',	3,      237,   229 ), /*   236 inc               */
+  S_ST( 'e',	3,      318,     0 ), /*   237 incm              */
+  S_ST( 'i',	3,      239,   224 ), /*   238 in                */
+  S_ST( 't',	3,      244,     0 ), /*   239 ini               */
+  S_ST( 'a',	3,      241,     0 ), /*   240 init              */
+  S_ST( 'l',	3,      242,     0 ), /*   241 inita             */
+  S_ST( 'l',	3,      243,     0 ), /*   242 inital            */
+  S_ST( 'o',	3,      319,     0 ), /*   243 initall           */
+  S_ST( 'm',	3,      245,   240 ), /*   244 init              */
+  S_ST( 'e',	3,      320,     0 ), /*   245 initm             */
+  S_ST( 't',	3,      247,   238 ), /*   246 in                */
+  S_ST( 'e',	3,      248,     0 ), /*   247 int               */
+  S_ST( 'r',	3,      249,     0 ), /*   248 inte              */
+  S_ST( 'f',	3,      250,     0 ), /*   249 inter             */
+  S_ST( 'a',	3,      251,     0 ), /*   250 interf            */
+  S_ST( 'c',	3,      323,     0 ), /*   251 interfa           */
+  S_ST( 'p',	3,      324,   325 ), /*   252 i                 */
+  S_ST( 'p',	3,      254,     0 ), /*   253 ip                */
+  S_ST( 'e',	3,      255,     0 ), /*   254 ipp               */
+  S_ST( 'e',	3,      256,     0 ), /*   255 ippe              */
+  S_ST( 'r',	3,      257,     0 ), /*   256 ippee             */
+  S_ST( 'l',	3,      290,     0 ), /*   257 ippeer            */
   S_ST( 'v',	1,        0,     0 ), /*   258 T_Abbrev          */
   S_ST( 'e',	0,        0,     0 ), /*   259 T_Age             */
   S_ST( 'l',	0,       12,     0 ), /*   260 T_All             */
@@ -494,671 +503,716 @@
   S_ST( 't',	0,        0,     0 ), /*   274 T_Burst           */
   S_ST( 'e',	0,        0,     0 ), /*   275 T_Calibrate       */
   S_ST( 'g',	0,        0,     0 ), /*   276 T_Ceiling         */
-  S_ST( 's',	0,        0,     0 ), /*   277 T_Clockstats      */
-  S_ST( 't',	0,        0,     0 ), /*   278 T_Cohort          */
-  S_ST( 'y',	0,        0,     0 ), /*   279 T_ControlKey      */
-  S_ST( 'o',	0,      114,     0 ), /*   280 T_Crypto          */
-  S_ST( 's',	0,        0,     0 ), /*   281 T_Cryptostats     */
-  S_ST( 'l',	0,        0,     0 ), /*   282 T_Ctl             */
-  S_ST( 'y',	0,        0,     0 ), /*   283 T_Day             */
-  S_ST( 't',	0,        0,     0 ), /*   284 T_Default         */
-  S_ST( 't',	1,        0,     0 ), /*   285 T_Digest          */
-  S_ST( 'e',	0,        0,     0 ), /*   286 T_Disable         */
-  S_ST( 'd',	0,        0,     0 ), /*   287 T_Discard         */
-  S_ST( 'n',	0,        0,     0 ), /*   288 T_Dispersion      */
-  S_ST( 'r',	3,      297,     0 ), /*   289 ke                */
-  S_ST( 'e',	1,        0,     0 ), /*   290 T_Driftfile       */
-  S_ST( 'p',	0,        0,     0 ), /*   291 T_Drop            */
-  S_ST( 'p',	0,        0,     0 ), /*   292 T_Dscp            */
-  S_ST( '.',	0,        0,     0 ), /*   293 T_Ellipsis        */
-  S_ST( 'e',	0,        0,     0 ), /*   294 T_Enable          */
-  S_ST( 'd',	0,        0,   161 ), /*   295 T_End             */
-  S_ST( 'r',	0,        0,     0 ), /*   296 T_Epeer           */
-  S_ST( 'n',	3,      319,     0 ), /*   297 ker               */
-  S_ST( 'e',	1,      172,     0 ), /*   298 T_File            */
-  S_ST( 'n',	0,        0,     0 ), /*   299 T_Filegen         */
-  S_ST( 'm',	0,        0,     0 ), /*   300 T_Filenum         */
-  S_ST( '1',	0,        0,     0 ), /*   301 T_Flag1           */
-  S_ST( '2',	0,        0,   301 ), /*   302 T_Flag2           */
-  S_ST( '3',	0,        0,   302 ), /*   303 T_Flag3           */
-  S_ST( '4',	0,        0,   303 ), /*   304 T_Flag4           */
-  S_ST( 'e',	0,        0,     0 ), /*   305 T_Flake           */
-  S_ST( 'r',	0,        0,     0 ), /*   306 T_Floor           */
-  S_ST( 'q',	0,      182,     0 ), /*   307 T_Freq            */
-  S_ST( 'e',	1,        0,     0 ), /*   308 T_Fudge           */
-  S_ST( 't',	1,        0,     0 ), /*   309 T_Host            */
-  S_ST( 'f',	0,        0,     0 ), /*   310 T_Huffpuff        */
-  S_ST( 't',	0,        0,     0 ), /*   311 T_Iburst          */
-  S_ST( 't',	1,        0,     0 ), /*   312 T_Ident           */
-  S_ST( 'e',	0,        0,     0 ), /*   313 T_Ignore          */
-  S_ST( 'c',	0,        0,     0 ), /*   314 T_Incalloc        */
-  S_ST( 'm',	0,        0,     0 ), /*   315 T_Incmem          */
-  S_ST( 'c',	0,        0,     0 ), /*   316 T_Initalloc       */
-  S_ST( 'm',	0,        0,     0 ), /*   317 T_Initmem         */
-  S_ST( 'e',	1,        0,     0 ), /*   318 T_Includefile     */
-  S_ST( 'e',	3,      328,     0 ), /*   319 kern              */
-  S_ST( 'e',	0,        0,     0 ), /*   320 T_Interface       */
-  S_ST( 'd',	3,      419,     0 ), /*   321 keys              */
-  S_ST( 'o',	0,        0,   212 ), /*   322 T_Io              */
-  S_ST( 't',	0,        0,     0 ), /*   323 T_Ippeerlimit     */
-  S_ST( '4',	0,        0,     0 ), /*   324 T_Ipv4            */
-  S_ST( '4',	0,        0,     0 ), /*   325 T_Ipv4_flag       */
-  S_ST( '6',	0,        0,   324 ), /*   326 T_Ipv6            */
-  S_ST( '6',	0,        0,   325 ), /*   327 T_Ipv6_flag       */
-  S_ST( 'l',	0,        0,     0 ), /*   328 T_Kernel          */
-  S_ST( 'y',	0,      330,   289 ), /*   329 T_Key             */
-  S_ST( 's',	1,      321,     0 ), /*   330 T_Keys            */
-  S_ST( 'r',	1,        0,     0 ), /*   331 T_Keysdir         */
-  S_ST( 'd',	0,        0,     0 ), /*   332 T_Kod             */
-  S_ST( 'p',	0,        0,     0 ), /*   333 T_Mssntp          */
-  S_ST( 'e',	1,        0,     0 ), /*   334 T_Leapfile        */
-  S_ST( 'l',	0,        0,     0 ), /*   335 T_Leapsmearinterval */
-  S_ST( 'd',	0,        0,     0 ), /*   336 T_Limited         */
-  S_ST( 'k',	0,        0,     0 ), /*   337 T_Link            */
-  S_ST( 'n',	0,        0,     0 ), /*   338 T_Listen          */
-  S_ST( 'g',	2,        0,     0 ), /*   339 T_Logconfig       */
-  S_ST( 'e',	1,        0,     0 ), /*   340 T_Logfile         */
-  S_ST( 's',	0,        0,     0 ), /*   341 T_Loopstats       */
-  S_ST( 'p',	0,        0,     0 ), /*   342 T_Lowpriotrap     */
-  S_ST( 't',	1,        0,     0 ), /*   343 T_Manycastclient  */
-  S_ST( 'r',	2,        0,     0 ), /*   344 T_Manycastserver  */
-  S_ST( 'k',	0,        0,     0 ), /*   345 T_Mask            */
-  S_ST( 'e',	0,        0,     0 ), /*   346 T_Maxage          */
-  S_ST( 'k',	0,        0,     0 ), /*   347 T_Maxclock        */
-  S_ST( 'h',	0,        0,     0 ), /*   348 T_Maxdepth        */
-  S_ST( 't',	0,        0,     0 ), /*   349 T_Maxdist         */
-  S_ST( 'm',	0,        0,     0 ), /*   350 T_Maxmem          */
-  S_ST( 'l',	0,        0,     0 ), /*   351 T_Maxpoll         */
-  S_ST( 's',	0,        0,     0 ), /*   352 T_Mdnstries       */
-  S_ST( 'm',	0,      552,     0 ), /*   353 T_Mem             */
-  S_ST( 'k',	0,        0,     0 ), /*   354 T_Memlock         */
-  S_ST( 'k',	0,        0,     0 ), /*   355 T_Minclock        */
-  S_ST( 'h',	0,        0,     0 ), /*   356 T_Mindepth        */
-  S_ST( 't',	0,        0,     0 ), /*   357 T_Mindist         */
-  S_ST( 'm',	0,        0,     0 ), /*   358 T_Minimum         */
-  S_ST( 'l',	0,        0,     0 ), /*   359 T_Minpoll         */
-  S_ST( 'e',	0,        0,     0 ), /*   360 T_Minsane         */
-  S_ST( 'e',	0,      362,     0 ), /*   361 T_Mode            */
-  S_ST( '7',	0,        0,     0 ), /*   362 T_Mode7           */
-  S_ST( 'r',	0,        0,     0 ), /*   363 T_Monitor         */
-  S_ST( 'h',	0,        0,     0 ), /*   364 T_Month           */
-  S_ST( 'u',	0,        0,     0 ), /*   365 T_Mru             */
-  S_ST( 't',	2,        0,     0 ), /*   366 T_Multicastclient */
-  S_ST( 'c',	0,        0,     0 ), /*   367 T_Nic             */
-  S_ST( 'k',	0,        0,     0 ), /*   368 T_Nolink          */
-  S_ST( 'y',	0,        0,     0 ), /*   369 T_Nomodify        */
-  S_ST( 't',	0,        0,     0 ), /*   370 T_Nomrulist       */
-  S_ST( 'e',	0,        0,     0 ), /*   371 T_None            */
-  S_ST( 'e',	0,        0,     0 ), /*   372 T_Nonvolatile     */
-  S_ST( 'r',	0,        0,     0 ), /*   373 T_Noepeer         */
-  S_ST( 'r',	0,        0,     0 ), /*   374 T_Nopeer          */
-  S_ST( 'y',	0,        0,     0 ), /*   375 T_Noquery         */
-  S_ST( 't',	0,        0,     0 ), /*   376 T_Noselect        */
-  S_ST( 'e',	0,        0,     0 ), /*   377 T_Noserve         */
-  S_ST( 'p',	0,        0,     0 ), /*   378 T_Notrap          */
-  S_ST( 't',	0,        0,     0 ), /*   379 T_Notrust         */
-  S_ST( 'p',	0,      652,     0 ), /*   380 T_Ntp             */
-  S_ST( 't',	0,        0,     0 ), /*   381 T_Ntpport         */
-  S_ST( 't',	1,        0,     0 ), /*   382 T_NtpSignDsocket  */
-  S_ST( 'n',	0,      667,     0 ), /*   383 T_Orphan          */
-  S_ST( 't',	0,        0,     0 ), /*   384 T_Orphanwait      */
-  S_ST( 'y',	0,        0,     0 ), /*   385 T_PCEdigest       */
-  S_ST( 'c',	0,        0,     0 ), /*   386 T_Panic           */
-  S_ST( 'r',	1,      694,     0 ), /*   387 T_Peer            */
-  S_ST( 's',	0,        0,     0 ), /*   388 T_Peerstats       */
-  S_ST( 'e',	2,        0,     0 ), /*   389 T_Phone           */
-  S_ST( 'd',	0,      702,     0 ), /*   390 T_Pid             */
-  S_ST( 'e',	1,        0,     0 ), /*   391 T_Pidfile         */
-  S_ST( 'l',	1,        0,     0 ), /*   392 T_Pool            */
-  S_ST( 't',	0,        0,     0 ), /*   393 T_Port            */
-  S_ST( 't',	0,        0,     0 ), /*   394 T_Preempt         */
-  S_ST( 'r',	0,        0,     0 ), /*   395 T_Prefer          */
-  S_ST( 's',	0,        0,     0 ), /*   396 T_Protostats      */
-  S_ST( 'w',	1,        0,   708 ), /*   397 T_Pw              */
-  S_ST( 'e',	1,        0,     0 ), /*   398 T_Randfile        */
-  S_ST( 's',	0,        0,     0 ), /*   399 T_Rawstats        */
-  S_ST( 'd',	1,        0,     0 ), /*   400 T_Refid           */
-  S_ST( 'y',	0,        0,     0 ), /*   401 T_Requestkey      */
-  S_ST( 't',	0,        0,     0 ), /*   402 T_Reset           */
-  S_ST( 't',	0,        0,     0 ), /*   403 T_Restrict        */
-  S_ST( 'e',	0,        0,     0 ), /*   404 T_Revoke          */
-  S_ST( 't',	0,        0,     0 ), /*   405 T_Rlimit          */
-  S_ST( 'r',	1,        0,     0 ), /*   406 T_Saveconfigdir   */
-  S_ST( 'r',	1,      785,     0 ), /*   407 T_Server          */
-  S_ST( 'r',	1,        0,     0 ), /*   408 T_Setvar          */
-  S_ST( 'e',	0,        0,     0 ), /*   409 T_Source          */
-  S_ST( 'e',	0,        0,     0 ), /*   410 T_Stacksize       */
-  S_ST( 's',	0,        0,     0 ), /*   411 T_Statistics      */
-  S_ST( 's',	0,      828,   823 ), /*   412 T_Stats           */
-  S_ST( 'r',	1,        0,     0 ), /*   413 T_Statsdir        */
-  S_ST( 'p',	0,      836,     0 ), /*   414 T_Step            */
-  S_ST( 'k',	0,        0,     0 ), /*   415 T_Stepback        */
-  S_ST( 'd',	0,        0,     0 ), /*   416 T_Stepfwd         */
-  S_ST( 't',	0,        0,     0 ), /*   417 T_Stepout         */
-  S_ST( 'm',	0,        0,     0 ), /*   418 T_Stratum         */
-  S_ST( 'i',	3,      331,     0 ), /*   419 keysd             */
-  S_ST( 's',	0,      843,     0 ), /*   420 T_Sys             */
-  S_ST( 's',	0,        0,     0 ), /*   421 T_Sysstats        */
-  S_ST( 'k',	0,        0,     0 ), /*   422 T_Tick            */
-  S_ST( '1',	0,        0,     0 ), /*   423 T_Time1           */
-  S_ST( '2',	0,        0,   423 ), /*   424 T_Time2           */
-  S_ST( 'r',	0,        0,   424 ), /*   425 T_Timer           */
-  S_ST( 's',	0,        0,     0 ), /*   426 T_Timingstats     */
-  S_ST( 'r',	0,        0,     0 ), /*   427 T_Tinker          */
-  S_ST( 's',	0,        0,     0 ), /*   428 T_Tos             */
-  S_ST( 'p',	1,        0,     0 ), /*   429 T_Trap            */
-  S_ST( 'e',	0,        0,     0 ), /*   430 T_True            */
-  S_ST( 'y',	0,        0,     0 ), /*   431 T_Trustedkey      */
-  S_ST( 'l',	0,        0,     0 ), /*   432 T_Ttl             */
-  S_ST( 'e',	0,        0,     0 ), /*   433 T_Type            */
-  S_ST( 'o',	3,      332,   257 ), /*   434 k                 */
-  S_ST( 'y',	0,        0,     0 ), /*   435 T_UEcrypto        */
-  S_ST( 'y',	0,        0,     0 ), /*   436 T_UEcryptonak     */
-  S_ST( 'y',	0,        0,     0 ), /*   437 T_UEdigest        */
-  S_ST( 'g',	1,        0,     0 ), /*   438 T_Unconfig        */
-  S_ST( 'r',	1,      885,     0 ), /*   439 T_Unpeer          */
-  S_ST( 'n',	0,        0,     0 ), /*   440 T_Version         */
-  S_ST( 'l',	3,      483,   256 ), /*   441                   */
-  S_ST( 'k',	0,        0,     0 ), /*   442 T_Week            */
-  S_ST( 'd',	0,        0,     0 ), /*   443 T_Wildcard        */
-  S_ST( 'e',	0,        0,     0 ), /*   444 T_Xleave          */
-  S_ST( 'r',	0,        0,     0 ), /*   445 T_Year            */
-  S_ST( 'e',	3,      447,     0 ), /*   446 l                 */
-  S_ST( 'a',	3,      458,     0 ), /*   447 le                */
-  S_ST( 'e',	0,        0,     0 ), /*   448 T_Simulate        */
-  S_ST( 'y',	0,        0,     0 ), /*   449 T_Beep_Delay      */
-  S_ST( 'n',	0,        0,     0 ), /*   450 T_Sim_Duration    */
-  S_ST( 't',	0,        0,     0 ), /*   451 T_Server_Offset   */
-  S_ST( 'n',	0,        0,     0 ), /*   452 T_Duration        */
-  S_ST( 't',	0,        0,     0 ), /*   453 T_Freq_Offset     */
-  S_ST( 'r',	0,        0,     0 ), /*   454 T_Wander          */
-  S_ST( 'r',	0,        0,     0 ), /*   455 T_Jitter          */
-  S_ST( 'y',	0,        0,     0 ), /*   456 T_Prop_Delay      */
-  S_ST( 'y',	0,        0,     0 ), /*   457 T_Proc_Delay      */
-  S_ST( 'p',	3,      462,     0 ), /*   458 lea               */
-  S_ST( 'f',	3,      460,     0 ), /*   459 leap              */
-  S_ST( 'i',	3,      461,     0 ), /*   460 leapf             */
-  S_ST( 'l',	3,      334,     0 ), /*   461 leapfi            */
-  S_ST( 's',	3,      463,   459 ), /*   462 leap              */
-  S_ST( 'm',	3,      464,     0 ), /*   463 leaps             */
-  S_ST( 'e',	3,      465,     0 ), /*   464 leapsm            */
-  S_ST( 'a',	3,      466,     0 ), /*   465 leapsme           */
-  S_ST( 'r',	3,      467,     0 ), /*   466 leapsmea          */
-  S_ST( 'i',	3,      468,     0 ), /*   467 leapsmear         */
-  S_ST( 'n',	3,      469,     0 ), /*   468 leapsmeari        */
-  S_ST( 't',	3,      470,     0 ), /*   469 leapsmearin       */
-  S_ST( 'e',	3,      471,     0 ), /*   470 leapsmearint      */
-  S_ST( 'r',	3,      472,     0 ), /*   471 leapsmearinte     */
-  S_ST( 'v',	3,      473,     0 ), /*   472 leapsmearinter    */
-  S_ST( 'a',	3,      335,     0 ), /*   473 leapsmearinterv   */
-  S_ST( 'i',	3,      480,   446 ), /*   474 l                 */
-  S_ST( 'm',	3,      476,     0 ), /*   475 li                */
-  S_ST( 'i',	3,      477,     0 ), /*   476 lim               */
-  S_ST( 't',	3,      478,     0 ), /*   477 limi              */
-  S_ST( 'e',	3,      336,     0 ), /*   478 limit             */
-  S_ST( 'n',	3,      337,   475 ), /*   479 li                */
-  S_ST( 's',	3,      481,   479 ), /*   480 li                */
-  S_ST( 't',	3,      482,     0 ), /*   481 lis               */
-  S_ST( 'e',	3,      338,     0 ), /*   482 list              */
-  S_ST( 'o',	3,      499,   474 ), /*   483 l                 */
-  S_ST( 'g',	3,      490,     0 ), /*   484 lo                */
-  S_ST( 'c',	3,      486,     0 ), /*   485 log               */
-  S_ST( 'o',	3,      487,     0 ), /*   486 logc              */
-  S_ST( 'n',	3,      488,     0 ), /*   487 logco             */
-  S_ST( 'f',	3,      489,     0 ), /*   488 logcon            */
-  S_ST( 'i',	3,      339,     0 ), /*   489 logconf           */
-  S_ST( 'f',	3,      491,   485 ), /*   490 log               */
-  S_ST( 'i',	3,      492,     0 ), /*   491 logf              */
-  S_ST( 'l',	3,      340,     0 ), /*   492 logfi             */
-  S_ST( 'o',	3,      494,   484 ), /*   493 lo                */
-  S_ST( 'p',	3,      495,     0 ), /*   494 loo               */
-  S_ST( 's',	3,      496,     0 ), /*   495 loop              */
-  S_ST( 't',	3,      497,     0 ), /*   496 loops             */
-  S_ST( 'a',	3,      498,     0 ), /*   497 loopst            */
-  S_ST( 't',	3,      341,     0 ), /*   498 loopsta           */
-  S_ST( 'w',	3,      500,   493 ), /*   499 lo                */
-  S_ST( 'p',	3,      501,     0 ), /*   500 low               */
-  S_ST( 'r',	3,      502,     0 ), /*   501 lowp              */
-  S_ST( 'i',	3,      503,     0 ), /*   502 lowpr             */
-  S_ST( 'o',	3,      504,     0 ), /*   503 lowpri            */
-  S_ST( 't',	3,      505,     0 ), /*   504 lowprio           */
-  S_ST( 'r',	3,      506,     0 ), /*   505 lowpriot          */
-  S_ST( 'a',	3,      342,     0 ), /*   506 lowpriotr         */
-  S_ST( 'm',	3,      588,   441 ), /*   507                   */
-  S_ST( 'a',	3,      526,     0 ), /*   508 m                 */
-  S_ST( 'n',	3,      510,     0 ), /*   509 ma                */
-  S_ST( 'y',	3,      511,     0 ), /*   510 man               */
-  S_ST( 'c',	3,      512,     0 ), /*   511 many              */
-  S_ST( 'a',	3,      513,     0 ), /*   512 manyc             */
-  S_ST( 's',	3,      514,     0 ), /*   513 manyca            */
-  S_ST( 't',	3,      520,     0 ), /*   514 manycas           */
-  S_ST( 'c',	3,      516,     0 ), /*   515 manycast          */
-  S_ST( 'l',	3,      517,     0 ), /*   516 manycastc         */
-  S_ST( 'i',	3,      518,     0 ), /*   517 manycastcl        */
-  S_ST( 'e',	3,      519,     0 ), /*   518 manycastcli       */
-  S_ST( 'n',	3,      343,     0 ), /*   519 manycastclie      */
-  S_ST( 's',	3,      521,   515 ), /*   520 manycast          */
-  S_ST( 'e',	3,      522,     0 ), /*   521 manycasts         */
-  S_ST( 'r',	3,      523,     0 ), /*   522 manycastse        */
-  S_ST( 'v',	3,      524,     0 ), /*   523 manycastser       */
-  S_ST( 'e',	3,      344,     0 ), /*   524 manycastserv      */
-  S_ST( 's',	3,      345,   509 ), /*   525 ma                */
-  S_ST( 'x',	3,      541,   525 ), /*   526 ma                */
-  S_ST( 'a',	3,      528,     0 ), /*   527 max               */
-  S_ST( 'g',	3,      346,     0 ), /*   528 maxa              */
-  S_ST( 'c',	3,      530,   527 ), /*   529 max               */
-  S_ST( 'l',	3,      531,     0 ), /*   530 maxc              */
-  S_ST( 'o',	3,      532,     0 ), /*   531 maxcl             */
-  S_ST( 'c',	3,      347,     0 ), /*   532 maxclo            */
-  S_ST( 'd',	3,      537,   529 ), /*   533 max               */
-  S_ST( 'e',	3,      535,     0 ), /*   534 maxd              */
-  S_ST( 'p',	3,      536,     0 ), /*   535 maxde             */
-  S_ST( 't',	3,      348,     0 ), /*   536 maxdep            */
-  S_ST( 'i',	3,      538,   534 ), /*   537 maxd              */
-  S_ST( 's',	3,      349,     0 ), /*   538 maxdi             */
-  S_ST( 'm',	3,      540,   533 ), /*   539 max               */
-  S_ST( 'e',	3,      350,     0 ), /*   540 maxm              */
-  S_ST( 'p',	3,      542,   539 ), /*   541 max               */
-  S_ST( 'o',	3,      543,     0 ), /*   542 maxp              */
-  S_ST( 'l',	3,      351,     0 ), /*   543 maxpo             */
-  S_ST( 'd',	3,      545,   508 ), /*   544 m                 */
-  S_ST( 'n',	3,      546,     0 ), /*   545 md                */
-  S_ST( 's',	3,      547,     0 ), /*   546 mdn               */
-  S_ST( 't',	3,      548,     0 ), /*   547 mdns              */
-  S_ST( 'r',	3,      549,     0 ), /*   548 mdnst             */
-  S_ST( 'i',	3,      550,     0 ), /*   549 mdnstr            */
-  S_ST( 'e',	3,      352,     0 ), /*   550 mdnstri           */
-  S_ST( 'e',	3,      353,   544 ), /*   551 m                 */
-  S_ST( 'l',	3,      553,     0 ), /*   552 mem               */
-  S_ST( 'o',	3,      554,     0 ), /*   553 meml              */
-  S_ST( 'c',	3,      354,     0 ), /*   554 memlo             */
-  S_ST( 'i',	3,      556,   551 ), /*   555 m                 */
-  S_ST( 'n',	3,      573,     0 ), /*   556 mi                */
-  S_ST( 'c',	3,      558,     0 ), /*   557 min               */
-  S_ST( 'l',	3,      559,     0 ), /*   558 minc              */
-  S_ST( 'o',	3,      560,     0 ), /*   559 mincl             */
-  S_ST( 'c',	3,      355,     0 ), /*   560 minclo            */
-  S_ST( 'd',	3,      565,   557 ), /*   561 min               */
-  S_ST( 'e',	3,      563,     0 ), /*   562 mind              */
-  S_ST( 'p',	3,      564,     0 ), /*   563 minde             */
-  S_ST( 't',	3,      356,     0 ), /*   564 mindep            */
-  S_ST( 'i',	3,      566,   562 ), /*   565 mind              */
-  S_ST( 's',	3,      357,     0 ), /*   566 mindi             */
-  S_ST( 'i',	3,      568,   561 ), /*   567 min               */
-  S_ST( 'm',	3,      569,     0 ), /*   568 mini              */
-  S_ST( 'u',	3,      358,     0 ), /*   569 minim             */
-  S_ST( 'p',	3,      571,   567 ), /*   570 min               */
-  S_ST( 'o',	3,      572,     0 ), /*   571 minp              */
-  S_ST( 'l',	3,      359,     0 ), /*   572 minpo             */
-  S_ST( 's',	3,      574,   570 ), /*   573 min               */
-  S_ST( 'a',	3,      575,     0 ), /*   574 mins              */
-  S_ST( 'n',	3,      360,     0 ), /*   575 minsa             */
-  S_ST( 'o',	3,      578,   555 ), /*   576 m                 */
-  S_ST( 'd',	3,      361,     0 ), /*   577 mo                */
-  S_ST( 'n',	3,      582,   577 ), /*   578 mo                */
-  S_ST( 'i',	3,      580,     0 ), /*   579 mon               */
-  S_ST( 't',	3,      581,     0 ), /*   580 moni              */
-  S_ST( 'o',	3,      363,     0 ), /*   581 monit             */
-  S_ST( 't',	3,      364,   579 ), /*   582 mon               */
-  S_ST( 'r',	3,      365,   576 ), /*   583 m                 */
-  S_ST( 's',	3,      585,   583 ), /*   584 m                 */
-  S_ST( 's',	3,      586,     0 ), /*   585 ms                */
-  S_ST( 'n',	3,      587,     0 ), /*   586 mss               */
-  S_ST( 't',	3,      333,     0 ), /*   587 mssn              */
-  S_ST( 'u',	3,      589,   584 ), /*   588 m                 */
-  S_ST( 'l',	3,      590,     0 ), /*   589 mu                */
-  S_ST( 't',	3,      591,     0 ), /*   590 mul               */
-  S_ST( 'i',	3,      592,     0 ), /*   591 mult              */
-  S_ST( 'c',	3,      593,     0 ), /*   592 multi             */
-  S_ST( 'a',	3,      594,     0 ), /*   593 multic            */
-  S_ST( 's',	3,      595,     0 ), /*   594 multica           */
-  S_ST( 't',	3,      596,     0 ), /*   595 multicas          */
-  S_ST( 'c',	3,      597,     0 ), /*   596 multicast         */
-  S_ST( 'l',	3,      598,     0 ), /*   597 multicastc        */
-  S_ST( 'i',	3,      599,     0 ), /*   598 multicastcl       */
-  S_ST( 'e',	3,      600,     0 ), /*   599 multicastcli      */
-  S_ST( 'n',	3,      366,     0 ), /*   600 multicastclie     */
-  S_ST( 'n',	3,      648,   507 ), /*   601                   */
-  S_ST( 'i',	3,      367,     0 ), /*   602 n                 */
-  S_ST( 'o',	3,      643,   602 ), /*   603 n                 */
-  S_ST( 'e',	3,      605,     0 ), /*   604 no                */
-  S_ST( 'p',	3,      606,     0 ), /*   605 noe               */
-  S_ST( 'e',	3,      607,     0 ), /*   606 noep              */
-  S_ST( 'e',	3,      373,     0 ), /*   607 noepe             */
-  S_ST( 'l',	3,      609,   604 ), /*   608 no                */
-  S_ST( 'i',	3,      610,     0 ), /*   609 nol               */
-  S_ST( 'n',	3,      368,     0 ), /*   610 noli              */
-  S_ST( 'm',	3,      616,   608 ), /*   611 no                */
-  S_ST( 'o',	3,      613,     0 ), /*   612 nom               */
-  S_ST( 'd',	3,      614,     0 ), /*   613 nomo              */
-  S_ST( 'i',	3,      615,     0 ), /*   614 nomod             */
-  S_ST( 'f',	3,      369,     0 ), /*   615 nomodi            */
-  S_ST( 'r',	3,      617,   612 ), /*   616 nom               */
-  S_ST( 'u',	3,      618,     0 ), /*   617 nomr              */
-  S_ST( 'l',	3,      619,     0 ), /*   618 nomru             */
-  S_ST( 'i',	3,      620,     0 ), /*   619 nomrul            */
-  S_ST( 's',	3,      370,     0 ), /*   620 nomruli           */
-  S_ST( 'n',	3,      622,   611 ), /*   621 no                */
-  S_ST( 'v',	3,      623,   371 ), /*   622 non               */
-  S_ST( 'o',	3,      624,     0 ), /*   623 nonv              */
-  S_ST( 'l',	3,      625,     0 ), /*   624 nonvo             */
-  S_ST( 'a',	3,      626,     0 ), /*   625 nonvol            */
-  S_ST( 't',	3,      627,     0 ), /*   626 nonvola           */
-  S_ST( 'i',	3,      628,     0 ), /*   627 nonvolat          */
-  S_ST( 'l',	3,      372,     0 ), /*   628 nonvolati         */
-  S_ST( 'p',	3,      630,   621 ), /*   629 no                */
-  S_ST( 'e',	3,      631,     0 ), /*   630 nop               */
-  S_ST( 'e',	3,      374,     0 ), /*   631 nope              */
-  S_ST( 'q',	3,      633,   629 ), /*   632 no                */
-  S_ST( 'u',	3,      634,     0 ), /*   633 noq               */
-  S_ST( 'e',	3,      635,     0 ), /*   634 noqu              */
-  S_ST( 'r',	3,      375,     0 ), /*   635 noque             */
-  S_ST( 's',	3,      637,   632 ), /*   636 no                */
-  S_ST( 'e',	3,      641,     0 ), /*   637 nos               */
-  S_ST( 'l',	3,      639,     0 ), /*   638 nose              */
-  S_ST( 'e',	3,      640,     0 ), /*   639 nosel             */
-  S_ST( 'c',	3,      376,     0 ), /*   640 nosele            */
-  S_ST( 'r',	3,      642,   638 ), /*   641 nose              */
-  S_ST( 'v',	3,      377,     0 ), /*   642 noser             */
-  S_ST( 't',	3,      644,   636 ), /*   643 no                */
-  S_ST( 'r',	3,      646,     0 ), /*   644 not               */
-  S_ST( 'a',	3,      378,     0 ), /*   645 notr              */
-  S_ST( 'u',	3,      647,   645 ), /*   646 notr              */
-  S_ST( 's',	3,      379,     0 ), /*   647 notru             */
-  S_ST( 't',	3,      380,   603 ), /*   648 n                 */
-  S_ST( 'p',	3,      650,     0 ), /*   649 ntp               */
-  S_ST( 'o',	3,      651,     0 ), /*   650 ntpp              */
-  S_ST( 'r',	3,      381,     0 ), /*   651 ntppo             */
-  S_ST( 's',	3,      653,   649 ), /*   652 ntp               */
-  S_ST( 'i',	3,      654,     0 ), /*   653 ntps              */
-  S_ST( 'g',	3,      655,     0 ), /*   654 ntpsi             */
-  S_ST( 'n',	3,      656,     0 ), /*   655 ntpsig            */
-  S_ST( 'd',	3,      657,     0 ), /*   656 ntpsign           */
-  S_ST( 's',	3,      658,     0 ), /*   657 ntpsignd          */
-  S_ST( 'o',	3,      659,     0 ), /*   658 ntpsignds         */
-  S_ST( 'c',	3,      660,     0 ), /*   659 ntpsigndso        */
-  S_ST( 'k',	3,      661,     0 ), /*   660 ntpsigndsoc       */
-  S_ST( 'e',	3,      382,     0 ), /*   661 ntpsigndsock      */
-  S_ST( 'o',	3,      663,   601 ), /*   662                   */
-  S_ST( 'r',	3,      664,     0 ), /*   663 o                 */
-  S_ST( 'p',	3,      665,     0 ), /*   664 or                */
-  S_ST( 'h',	3,      666,     0 ), /*   665 orp               */
-  S_ST( 'a',	3,      383,     0 ), /*   666 orph              */
-  S_ST( 'w',	3,      668,     0 ), /*   667 orphan            */
-  S_ST( 'a',	3,      669,     0 ), /*   668 orphanw           */
-  S_ST( 'i',	3,      384,     0 ), /*   669 orphanwa          */
-  S_ST( 'p',	3,      397,   662 ), /*   670                   */
-  S_ST( 'a',	3,      672,     0 ), /*   671 p                 */
-  S_ST( 'n',	3,      673,     0 ), /*   672 pa                */
-  S_ST( 'i',	3,      386,     0 ), /*   673 pan               */
-  S_ST( 'e',	3,      675,   671 ), /*   674 p                 */
-  S_ST( 'e',	3,      387,     0 ), /*   675 pe                */
-  S_ST( '_',	3,      677,     0 ), /*   676 peer              */
-  S_ST( 'c',	3,      678,     0 ), /*   677 peer_             */
-  S_ST( 'l',	3,      679,     0 ), /*   678 peer_c            */
-  S_ST( 'e',	3,      680,     0 ), /*   679 peer_cl           */
-  S_ST( 'a',	3,      681,     0 ), /*   680 peer_cle          */
-  S_ST( 'r',	3,      682,     0 ), /*   681 peer_clea         */
-  S_ST( '_',	3,      683,     0 ), /*   682 peer_clear        */
-  S_ST( 'd',	3,      684,     0 ), /*   683 peer_clear_       */
-  S_ST( 'i',	3,      685,     0 ), /*   684 peer_clear_d      */
-  S_ST( 'g',	3,      686,     0 ), /*   685 peer_clear_di     */
-  S_ST( 'e',	3,      687,     0 ), /*   686 peer_clear_dig    */
-  S_ST( 's',	3,      688,     0 ), /*   687 peer_clear_dige   */
-  S_ST( 't',	3,      689,     0 ), /*   688 peer_clear_diges  */
-  S_ST( '_',	3,      690,     0 ), /*   689 peer_clear_digest */
-  S_ST( 'e',	3,      691,     0 ), /*   690 peer_clear_digest_ */
-  S_ST( 'a',	3,      692,     0 ), /*   691 peer_clear_digest_e */
-  S_ST( 'r',	3,      693,     0 ), /*   692 peer_clear_digest_ea */
-  S_ST( 'l',	3,      385,     0 ), /*   693 peer_clear_digest_ear */
-  S_ST( 's',	3,      695,   676 ), /*   694 peer              */
-  S_ST( 't',	3,      696,     0 ), /*   695 peers             */
-  S_ST( 'a',	3,      697,     0 ), /*   696 peerst            */
-  S_ST( 't',	3,      388,     0 ), /*   697 peersta           */
-  S_ST( 'h',	3,      699,   674 ), /*   698 p                 */
-  S_ST( 'o',	3,      700,     0 ), /*   699 ph                */
-  S_ST( 'n',	3,      389,     0 ), /*   700 pho               */
-  S_ST( 'i',	3,      390,   698 ), /*   701 p                 */
-  S_ST( 'f',	3,      703,     0 ), /*   702 pid               */
-  S_ST( 'i',	3,      704,     0 ), /*   703 pidf              */
-  S_ST( 'l',	3,      391,     0 ), /*   704 pidfi             */
-  S_ST( 'o',	3,      707,   701 ), /*   705 p                 */
-  S_ST( 'o',	3,      392,     0 ), /*   706 po                */
-  S_ST( 'r',	3,      393,   706 ), /*   707 po                */
-  S_ST( 'r',	3,      715,   705 ), /*   708 p                 */
-  S_ST( 'e',	3,      713,     0 ), /*   709 pr                */
-  S_ST( 'e',	3,      711,     0 ), /*   710 pre               */
-  S_ST( 'm',	3,      712,     0 ), /*   711 pree              */
-  S_ST( 'p',	3,      394,     0 ), /*   712 preem             */
-  S_ST( 'f',	3,      714,   710 ), /*   713 pre               */
-  S_ST( 'e',	3,      395,     0 ), /*   714 pref              */
-  S_ST( 'o',	3,      728,   709 ), /*   715 pr                */
-  S_ST( 'c',	3,      717,     0 ), /*   716 pro               */
-  S_ST( '_',	3,      718,     0 ), /*   717 proc              */
-  S_ST( 'd',	3,      719,     0 ), /*   718 proc_             */
-  S_ST( 'e',	3,      720,     0 ), /*   719 proc_d            */
-  S_ST( 'l',	3,      721,     0 ), /*   720 proc_de           */
-  S_ST( 'a',	3,      457,     0 ), /*   721 proc_del          */
-  S_ST( 'p',	3,      723,   716 ), /*   722 pro               */
-  S_ST( '_',	3,      724,     0 ), /*   723 prop              */
-  S_ST( 'd',	3,      725,     0 ), /*   724 prop_             */
-  S_ST( 'e',	3,      726,     0 ), /*   725 prop_d            */
-  S_ST( 'l',	3,      727,     0 ), /*   726 prop_de           */
-  S_ST( 'a',	3,      456,     0 ), /*   727 prop_del          */
-  S_ST( 't',	3,      729,   722 ), /*   728 pro               */
-  S_ST( 'o',	3,      730,     0 ), /*   729 prot              */
-  S_ST( 's',	3,      731,     0 ), /*   730 proto             */
-  S_ST( 't',	3,      732,     0 ), /*   731 protos            */
-  S_ST( 'a',	3,      733,     0 ), /*   732 protost           */
-  S_ST( 't',	3,      396,     0 ), /*   733 protosta          */
-  S_ST( 'r',	3,      765,   670 ), /*   734                   */
-  S_ST( 'a',	3,      741,     0 ), /*   735 r                 */
-  S_ST( 'n',	3,      737,     0 ), /*   736 ra                */
-  S_ST( 'd',	3,      738,     0 ), /*   737 ran               */
-  S_ST( 'f',	3,      739,     0 ), /*   738 rand              */
-  S_ST( 'i',	3,      740,     0 ), /*   739 randf             */
-  S_ST( 'l',	3,      398,     0 ), /*   740 randfi            */
-  S_ST( 'w',	3,      742,   736 ), /*   741 ra                */
-  S_ST( 's',	3,      743,     0 ), /*   742 raw               */
-  S_ST( 't',	3,      744,     0 ), /*   743 raws              */
-  S_ST( 'a',	3,      745,     0 ), /*   744 rawst             */
-  S_ST( 't',	3,      399,     0 ), /*   745 rawsta            */
-  S_ST( 'e',	3,      762,   735 ), /*   746 r                 */
-  S_ST( 'f',	3,      748,     0 ), /*   747 re                */
-  S_ST( 'i',	3,      400,     0 ), /*   748 ref               */
-  S_ST( 'q',	3,      750,   747 ), /*   749 re                */
-  S_ST( 'u',	3,      751,     0 ), /*   750 req               */
-  S_ST( 'e',	3,      752,     0 ), /*   751 requ              */
-  S_ST( 's',	3,      753,     0 ), /*   752 reque             */
-  S_ST( 't',	3,      754,     0 ), /*   753 reques            */
-  S_ST( 'k',	3,      755,     0 ), /*   754 request           */
-  S_ST( 'e',	3,      401,     0 ), /*   755 requestk          */
-  S_ST( 's',	3,      758,   749 ), /*   756 re                */
-  S_ST( 'e',	3,      402,     0 ), /*   757 res               */
-  S_ST( 't',	3,      759,   757 ), /*   758 res               */
-  S_ST( 'r',	3,      760,     0 ), /*   759 rest              */
-  S_ST( 'i',	3,      761,     0 ), /*   760 restr             */
-  S_ST( 'c',	3,      403,     0 ), /*   761 restri            */
-  S_ST( 'v',	3,      763,   756 ), /*   762 re                */
-  S_ST( 'o',	3,      764,     0 ), /*   763 rev               */
-  S_ST( 'k',	3,      404,     0 ), /*   764 revo              */
-  S_ST( 'l',	3,      766,   746 ), /*   765 r                 */
-  S_ST( 'i',	3,      767,     0 ), /*   766 rl                */
-  S_ST( 'm',	3,      768,     0 ), /*   767 rli               */
-  S_ST( 'i',	3,      405,     0 ), /*   768 rlim              */
-  S_ST( 's',	3,      842,   734 ), /*   769                   */
-  S_ST( 'a',	3,      771,     0 ), /*   770 s                 */
-  S_ST( 'v',	3,      772,     0 ), /*   771 sa                */
-  S_ST( 'e',	3,      773,     0 ), /*   772 sav               */
-  S_ST( 'c',	3,      774,     0 ), /*   773 save              */
-  S_ST( 'o',	3,      775,     0 ), /*   774 savec             */
-  S_ST( 'n',	3,      776,     0 ), /*   775 saveco            */
-  S_ST( 'f',	3,      777,     0 ), /*   776 savecon           */
-  S_ST( 'i',	3,      778,     0 ), /*   777 saveconf          */
-  S_ST( 'g',	3,      779,     0 ), /*   778 saveconfi         */
-  S_ST( 'd',	3,      780,     0 ), /*   779 saveconfig        */
-  S_ST( 'i',	3,      406,     0 ), /*   780 saveconfigd       */
-  S_ST( 'e',	3,      791,   770 ), /*   781 s                 */
-  S_ST( 'r',	3,      783,     0 ), /*   782 se                */
-  S_ST( 'v',	3,      784,     0 ), /*   783 ser               */
-  S_ST( 'e',	3,      407,     0 ), /*   784 serv              */
-  S_ST( '_',	3,      786,     0 ), /*   785 server            */
-  S_ST( 'o',	3,      787,     0 ), /*   786 server_           */
-  S_ST( 'f',	3,      788,     0 ), /*   787 server_o          */
-  S_ST( 'f',	3,      789,     0 ), /*   788 server_of         */
-  S_ST( 's',	3,      790,     0 ), /*   789 server_off        */
-  S_ST( 'e',	3,      451,     0 ), /*   790 server_offs       */
-  S_ST( 't',	3,      792,   782 ), /*   791 se                */
-  S_ST( 'v',	3,      793,     0 ), /*   792 set               */
-  S_ST( 'a',	3,      408,     0 ), /*   793 setv              */
-  S_ST( 'i',	3,      795,   781 ), /*   794 s                 */
-  S_ST( 'm',	3,      796,     0 ), /*   795 si                */
-  S_ST( 'u',	3,      797,     0 ), /*   796 sim               */
-  S_ST( 'l',	3,      798,     0 ), /*   797 simu              */
-  S_ST( 'a',	3,      799,     0 ), /*   798 simul             */
-  S_ST( 't',	3,      800,     0 ), /*   799 simula            */
-  S_ST( 'i',	3,      801,   448 ), /*   800 simulat           */
-  S_ST( 'o',	3,      802,     0 ), /*   801 simulati          */
-  S_ST( 'n',	3,      803,     0 ), /*   802 simulatio         */
-  S_ST( '_',	3,      804,     0 ), /*   803 simulation        */
-  S_ST( 'd',	3,      805,     0 ), /*   804 simulation_       */
-  S_ST( 'u',	3,      806,     0 ), /*   805 simulation_d      */
-  S_ST( 'r',	3,      807,     0 ), /*   806 simulation_du     */
-  S_ST( 'a',	3,      808,     0 ), /*   807 simulation_dur    */
-  S_ST( 't',	3,      809,     0 ), /*   808 simulation_dura   */
-  S_ST( 'i',	3,      810,     0 ), /*   809 simulation_durat  */
-  S_ST( 'o',	3,      450,     0 ), /*   810 simulation_durati */
-  S_ST( 'o',	3,      812,   794 ), /*   811 s                 */
-  S_ST( 'u',	3,      813,     0 ), /*   812 so                */
-  S_ST( 'r',	3,      814,     0 ), /*   813 sou               */
-  S_ST( 'c',	3,      409,     0 ), /*   814 sour              */
-  S_ST( 't',	3,      838,   811 ), /*   815 s                 */
-  S_ST( 'a',	3,      822,     0 ), /*   816 st                */
-  S_ST( 'c',	3,      818,     0 ), /*   817 sta               */
-  S_ST( 'k',	3,      819,     0 ), /*   818 stac              */
-  S_ST( 's',	3,      820,     0 ), /*   819 stack             */
-  S_ST( 'i',	3,      821,     0 ), /*   820 stacks            */
-  S_ST( 'z',	3,      410,     0 ), /*   821 stacksi           */
-  S_ST( 't',	3,      412,   817 ), /*   822 sta               */
-  S_ST( 'i',	3,      824,     0 ), /*   823 stat              */
-  S_ST( 's',	3,      825,     0 ), /*   824 stati             */
-  S_ST( 't',	3,      826,     0 ), /*   825 statis            */
-  S_ST( 'i',	3,      827,     0 ), /*   826 statist           */
-  S_ST( 'c',	3,      411,     0 ), /*   827 statisti          */
-  S_ST( 'd',	3,      829,     0 ), /*   828 stats             */
-  S_ST( 'i',	3,      413,     0 ), /*   829 statsd            */
-  S_ST( 'e',	3,      414,   816 ), /*   830 st                */
-  S_ST( 'b',	3,      832,     0 ), /*   831 step              */
-  S_ST( 'a',	3,      833,     0 ), /*   832 stepb             */
-  S_ST( 'c',	3,      415,     0 ), /*   833 stepba            */
-  S_ST( 'f',	3,      835,   831 ), /*   834 step              */
-  S_ST( 'w',	3,      416,     0 ), /*   835 stepf             */
-  S_ST( 'o',	3,      837,   834 ), /*   836 step              */
-  S_ST( 'u',	3,      417,     0 ), /*   837 stepo             */
-  S_ST( 'r',	3,      839,   830 ), /*   838 st                */
-  S_ST( 'a',	3,      840,     0 ), /*   839 str               */
-  S_ST( 't',	3,      841,     0 ), /*   840 stra              */
-  S_ST( 'u',	3,      418,     0 ), /*   841 strat             */
-  S_ST( 'y',	3,      420,   815 ), /*   842 s                 */
-  S_ST( 's',	3,      844,     0 ), /*   843 sys               */
-  S_ST( 't',	3,      845,     0 ), /*   844 syss              */
-  S_ST( 'a',	3,      846,     0 ), /*   845 sysst             */
-  S_ST( 't',	3,      421,     0 ), /*   846 syssta            */
-  S_ST( 't',	3,      873,   769 ), /*   847                   */
-  S_ST( 'i',	3,      859,     0 ), /*   848 t                 */
-  S_ST( 'c',	3,      422,     0 ), /*   849 ti                */
-  S_ST( 'm',	3,      852,   849 ), /*   850 ti                */
-  S_ST( 'e',	3,      425,     0 ), /*   851 tim               */
-  S_ST( 'i',	3,      853,   851 ), /*   852 tim               */
-  S_ST( 'n',	3,      854,     0 ), /*   853 timi              */
-  S_ST( 'g',	3,      855,     0 ), /*   854 timin             */
-  S_ST( 's',	3,      856,     0 ), /*   855 timing            */
-  S_ST( 't',	3,      857,     0 ), /*   856 timings           */
-  S_ST( 'a',	3,      858,     0 ), /*   857 timingst          */
-  S_ST( 't',	3,      426,     0 ), /*   858 timingsta         */
-  S_ST( 'n',	3,      860,   850 ), /*   859 ti                */
-  S_ST( 'k',	3,      861,     0 ), /*   860 tin               */
-  S_ST( 'e',	3,      427,     0 ), /*   861 tink              */
-  S_ST( 'o',	3,      428,   848 ), /*   862 t                 */
-  S_ST( 'r',	3,      865,   862 ), /*   863 t                 */
-  S_ST( 'a',	3,      429,     0 ), /*   864 tr                */
-  S_ST( 'u',	3,      866,   864 ), /*   865 tr                */
-  S_ST( 's',	3,      867,   430 ), /*   866 tru               */
-  S_ST( 't',	3,      868,     0 ), /*   867 trus              */
-  S_ST( 'e',	3,      869,     0 ), /*   868 trust             */
-  S_ST( 'd',	3,      870,     0 ), /*   869 truste            */
-  S_ST( 'k',	3,      871,     0 ), /*   870 trusted           */
-  S_ST( 'e',	3,      431,     0 ), /*   871 trustedk          */
-  S_ST( 't',	3,      432,   863 ), /*   872 t                 */
-  S_ST( 'y',	3,      874,   872 ), /*   873 t                 */
-  S_ST( 'p',	3,      433,     0 ), /*   874 ty                */
-  S_ST( 'u',	3,      876,   847 ), /*   875                   */
-  S_ST( 'n',	3,      882,     0 ), /*   876 u                 */
-  S_ST( 'c',	3,      878,     0 ), /*   877 un                */
-  S_ST( 'o',	3,      879,     0 ), /*   878 unc               */
-  S_ST( 'n',	3,      880,     0 ), /*   879 unco              */
-  S_ST( 'f',	3,      881,     0 ), /*   880 uncon             */
-  S_ST( 'i',	3,      438,     0 ), /*   881 unconf            */
-  S_ST( 'p',	3,      883,   877 ), /*   882 un                */
-  S_ST( 'e',	3,      884,     0 ), /*   883 unp               */
-  S_ST( 'e',	3,      439,     0 ), /*   884 unpe              */
-  S_ST( '_',	3,      905,     0 ), /*   885 unpeer            */
-  S_ST( 'c',	3,      887,     0 ), /*   886 unpeer_           */
-  S_ST( 'r',	3,      888,     0 ), /*   887 unpeer_c          */
-  S_ST( 'y',	3,      889,     0 ), /*   888 unpeer_cr         */
-  S_ST( 'p',	3,      890,     0 ), /*   889 unpeer_cry        */
-  S_ST( 't',	3,      891,     0 ), /*   890 unpeer_cryp       */
-  S_ST( 'o',	3,      892,     0 ), /*   891 unpeer_crypt      */
-  S_ST( '_',	3,      897,     0 ), /*   892 unpeer_crypto     */
-  S_ST( 'e',	3,      894,     0 ), /*   893 unpeer_crypto_    */
-  S_ST( 'a',	3,      895,     0 ), /*   894 unpeer_crypto_e   */
-  S_ST( 'r',	3,      896,     0 ), /*   895 unpeer_crypto_ea  */
-  S_ST( 'l',	3,      435,     0 ), /*   896 unpeer_crypto_ear */
-  S_ST( 'n',	3,      898,   893 ), /*   897 unpeer_crypto_    */
-  S_ST( 'a',	3,      899,     0 ), /*   898 unpeer_crypto_n   */
-  S_ST( 'k',	3,      900,     0 ), /*   899 unpeer_crypto_na  */
-  S_ST( '_',	3,      901,     0 ), /*   900 unpeer_crypto_nak */
-  S_ST( 'e',	3,      902,     0 ), /*   901 unpeer_crypto_nak_ */
-  S_ST( 'a',	3,      903,     0 ), /*   902 unpeer_crypto_nak_e */
-  S_ST( 'r',	3,      904,     0 ), /*   903 unpeer_crypto_nak_ea */
-  S_ST( 'l',	3,      436,     0 ), /*   904 unpeer_crypto_nak_ear */
-  S_ST( 'd',	3,      906,   886 ), /*   905 unpeer_           */
-  S_ST( 'i',	3,      907,     0 ), /*   906 unpeer_d          */
-  S_ST( 'g',	3,      908,     0 ), /*   907 unpeer_di         */
-  S_ST( 'e',	3,      909,     0 ), /*   908 unpeer_dig        */
-  S_ST( 's',	3,      910,     0 ), /*   909 unpeer_dige       */
-  S_ST( 't',	3,      911,     0 ), /*   910 unpeer_diges      */
-  S_ST( '_',	3,      912,     0 ), /*   911 unpeer_digest     */
-  S_ST( 'e',	3,      913,     0 ), /*   912 unpeer_digest_    */
-  S_ST( 'a',	3,      914,     0 ), /*   913 unpeer_digest_e   */
-  S_ST( 'r',	3,      915,     0 ), /*   914 unpeer_digest_ea  */
-  S_ST( 'l',	3,      437,     0 ), /*   915 unpeer_digest_ear */
-  S_ST( 'v',	3,      917,   875 ), /*   916                   */
-  S_ST( 'e',	3,      918,     0 ), /*   917 v                 */
-  S_ST( 'r',	3,      919,     0 ), /*   918 ve                */
-  S_ST( 's',	3,      920,     0 ), /*   919 ver               */
-  S_ST( 'i',	3,      921,     0 ), /*   920 vers              */
-  S_ST( 'o',	3,      440,     0 ), /*   921 versi             */
-  S_ST( 'w',	3,      929,   916 ), /*   922                   */
-  S_ST( 'a',	3,      924,     0 ), /*   923 w                 */
-  S_ST( 'n',	3,      925,     0 ), /*   924 wa                */
-  S_ST( 'd',	3,      926,     0 ), /*   925 wan               */
-  S_ST( 'e',	3,      454,     0 ), /*   926 wand              */
-  S_ST( 'e',	3,      928,   923 ), /*   927 w                 */
-  S_ST( 'e',	3,      442,     0 ), /*   928 we                */
-  S_ST( 'i',	3,      930,   927 ), /*   929 w                 */
-  S_ST( 'l',	3,      931,     0 ), /*   930 wi                */
-  S_ST( 'd',	3,      932,     0 ), /*   931 wil               */
-  S_ST( 'c',	3,      933,     0 ), /*   932 wild              */
-  S_ST( 'a',	3,      934,     0 ), /*   933 wildc             */
-  S_ST( 'r',	3,      443,     0 ), /*   934 wildca            */
-  S_ST( 'x',	3,      936,   922 ), /*   935                   */
-  S_ST( 'l',	3,      937,     0 ), /*   936 x                 */
-  S_ST( 'e',	3,      938,     0 ), /*   937 xl                */
-  S_ST( 'a',	3,      939,     0 ), /*   938 xle               */
-  S_ST( 'v',	3,      444,     0 ), /*   939 xlea              */
-  S_ST( 'y',	3,      941,   935 ), /*   940 [initial state]   */
-  S_ST( 'e',	3,      942,     0 ), /*   941 y                 */
-  S_ST( 'a',	3,      445,     0 )  /*   942 ye                */
+  S_ST( 'h',	0,        0,     0 ), /*   277 T_Checkhash       */
+  S_ST( 's',	0,        0,     0 ), /*   278 T_Clockstats      */
+  S_ST( 't',	0,        0,     0 ), /*   279 T_Cohort          */
+  S_ST( 'y',	0,        0,     0 ), /*   280 T_ControlKey      */
+  S_ST( 'o',	0,      121,     0 ), /*   281 T_Crypto          */
+  S_ST( 's',	0,        0,     0 ), /*   282 T_Cryptostats     */
+  S_ST( 'l',	0,        0,     0 ), /*   283 T_Ctl             */
+  S_ST( 'y',	0,        0,     0 ), /*   284 T_Day             */
+  S_ST( 't',	0,        0,     0 ), /*   285 T_Default         */
+  S_ST( 't',	1,        0,     0 ), /*   286 T_Digest          */
+  S_ST( 'e',	0,        0,     0 ), /*   287 T_Disable         */
+  S_ST( 'd',	0,        0,     0 ), /*   288 T_Discard         */
+  S_ST( 'n',	0,        0,     0 ), /*   289 T_Dispersion      */
+  S_ST( 'i',	3,      298,     0 ), /*   290 ippeerl           */
+  S_ST( 'e',	1,        0,     0 ), /*   291 T_Driftfile       */
+  S_ST( 'p',	0,        0,     0 ), /*   292 T_Drop            */
+  S_ST( 'p',	0,        0,     0 ), /*   293 T_Dscp            */
+  S_ST( '.',	0,        0,     0 ), /*   294 T_Ellipsis        */
+  S_ST( 'e',	0,        0,     0 ), /*   295 T_Enable          */
+  S_ST( 'd',	0,        0,   168 ), /*   296 T_End             */
+  S_ST( 'r',	0,        0,     0 ), /*   297 T_Epeer           */
+  S_ST( 'm',	3,      322,     0 ), /*   298 ippeerli          */
+  S_ST( 'e',	1,      179,     0 ), /*   299 T_File            */
+  S_ST( 'n',	0,        0,     0 ), /*   300 T_Filegen         */
+  S_ST( 'm',	0,        0,     0 ), /*   301 T_Filenum         */
+  S_ST( '1',	0,        0,     0 ), /*   302 T_Flag1           */
+  S_ST( '2',	0,        0,   302 ), /*   303 T_Flag2           */
+  S_ST( '3',	0,        0,   303 ), /*   304 T_Flag3           */
+  S_ST( '4',	0,        0,   304 ), /*   305 T_Flag4           */
+  S_ST( 'e',	0,        0,     0 ), /*   306 T_Flake           */
+  S_ST( 'r',	0,        0,     0 ), /*   307 T_Floor           */
+  S_ST( 'q',	0,      189,     0 ), /*   308 T_Freq            */
+  S_ST( 'e',	1,        0,     0 ), /*   309 T_Fudge           */
+  S_ST( 'z',	0,        0,     0 ), /*   310 T_Fuzz            */
+  S_ST( 't',	1,        0,     0 ), /*   311 T_Host            */
+  S_ST( 'f',	0,        0,     0 ), /*   312 T_Huffpuff        */
+  S_ST( 't',	0,        0,     0 ), /*   313 T_Iburst          */
+  S_ST( 't',	1,        0,     0 ), /*   314 T_Ident           */
+  S_ST( 'e',	0,      220,     0 ), /*   315 T_Ignore          */
+  S_ST( 'h',	0,        0,     0 ), /*   316 T_Ignorehash      */
+  S_ST( 'c',	0,        0,     0 ), /*   317 T_Incalloc        */
+  S_ST( 'm',	0,        0,     0 ), /*   318 T_Incmem          */
+  S_ST( 'c',	0,        0,     0 ), /*   319 T_Initalloc       */
+  S_ST( 'm',	0,        0,     0 ), /*   320 T_Initmem         */
+  S_ST( 'e',	1,        0,     0 ), /*   321 T_Includefile     */
+  S_ST( 'i',	3,      326,     0 ), /*   322 ippeerlim         */
+  S_ST( 'e',	0,        0,     0 ), /*   323 T_Interface       */
+  S_ST( 'v',	3,      329,   253 ), /*   324 ip                */
+  S_ST( 'o',	0,        0,   223 ), /*   325 T_Io              */
+  S_ST( 't',	0,        0,     0 ), /*   326 T_Ippeerlimit     */
+  S_ST( '4',	0,        0,     0 ), /*   327 T_Ipv4            */
+  S_ST( '4',	0,        0,     0 ), /*   328 T_Ipv4_flag       */
+  S_ST( '6',	0,        0,   327 ), /*   329 T_Ipv6            */
+  S_ST( '6',	0,        0,   328 ), /*   330 T_Ipv6_flag       */
+  S_ST( 'l',	0,        0,     0 ), /*   331 T_Kernel          */
+  S_ST( 'y',	0,      333,   468 ), /*   332 T_Key             */
+  S_ST( 's',	1,      471,     0 ), /*   333 T_Keys            */
+  S_ST( 'r',	1,        0,     0 ), /*   334 T_Keysdir         */
+  S_ST( 'd',	0,        0,     0 ), /*   335 T_Kod             */
+  S_ST( 'e',	1,        0,     0 ), /*   336 T_Leapfile        */
+  S_ST( 'l',	0,        0,     0 ), /*   337 T_Leapsmearinterval */
+  S_ST( 'd',	0,        0,     0 ), /*   338 T_Limited         */
+  S_ST( 'k',	0,        0,     0 ), /*   339 T_Link            */
+  S_ST( 'n',	0,        0,     0 ), /*   340 T_Listen          */
+  S_ST( 'g',	2,        0,     0 ), /*   341 T_Logconfig       */
+  S_ST( 'e',	1,        0,     0 ), /*   342 T_Logfile         */
+  S_ST( 's',	0,        0,     0 ), /*   343 T_Loopstats       */
+  S_ST( 'p',	0,        0,     0 ), /*   344 T_Lowpriotrap     */
+  S_ST( 't',	1,        0,     0 ), /*   345 T_Manycastclient  */
+  S_ST( 'r',	2,        0,     0 ), /*   346 T_Manycastserver  */
+  S_ST( 'k',	0,        0,     0 ), /*   347 T_Mask            */
+  S_ST( 'e',	0,        0,     0 ), /*   348 T_Maxage          */
+  S_ST( 'k',	0,        0,     0 ), /*   349 T_Maxclock        */
+  S_ST( 'h',	0,        0,     0 ), /*   350 T_Maxdepth        */
+  S_ST( 't',	0,        0,     0 ), /*   351 T_Maxdist         */
+  S_ST( 'm',	0,        0,     0 ), /*   352 T_Maxmem          */
+  S_ST( 'l',	0,        0,     0 ), /*   353 T_Maxpoll         */
+  S_ST( 's',	0,        0,     0 ), /*   354 T_Mdnstries       */
+  S_ST( 'm',	0,      571,     0 ), /*   355 T_Mem             */
+  S_ST( 'k',	0,        0,     0 ), /*   356 T_Memlock         */
+  S_ST( 'k',	0,        0,     0 ), /*   357 T_Minclock        */
+  S_ST( 'h',	0,        0,     0 ), /*   358 T_Mindepth        */
+  S_ST( 't',	0,        0,     0 ), /*   359 T_Mindist         */
+  S_ST( 'm',	0,        0,     0 ), /*   360 T_Minimum         */
+  S_ST( 'r',	0,        0,     0 ), /*   361 T_Minjitter       */
+  S_ST( 'l',	0,        0,     0 ), /*   362 T_Minpoll         */
+  S_ST( 'e',	0,        0,     0 ), /*   363 T_Minsane         */
+  S_ST( 'e',	0,      365,     0 ), /*   364 T_Mode            */
+  S_ST( '7',	0,        0,     0 ), /*   365 T_Mode7           */
+  S_ST( 'r',	0,        0,     0 ), /*   366 T_Monitor         */
+  S_ST( 'h',	0,        0,     0 ), /*   367 T_Month           */
+  S_ST( 'u',	0,        0,     0 ), /*   368 T_Mru             */
+  S_ST( 'p',	0,        0,     0 ), /*   369 T_Mssntp          */
+  S_ST( 't',	2,        0,     0 ), /*   370 T_Multicastclient */
+  S_ST( 'c',	0,        0,     0 ), /*   371 T_Nic             */
+  S_ST( 'k',	0,        0,     0 ), /*   372 T_Nolink          */
+  S_ST( 'y',	0,        0,     0 ), /*   373 T_Nomodify        */
+  S_ST( 't',	0,        0,     0 ), /*   374 T_Nomrulist       */
+  S_ST( 'e',	0,        0,     0 ), /*   375 T_None            */
+  S_ST( 'e',	0,        0,     0 ), /*   376 T_Nonvolatile     */
+  S_ST( 'r',	0,        0,     0 ), /*   377 T_Noepeer         */
+  S_ST( 'r',	0,        0,     0 ), /*   378 T_Nopeer          */
+  S_ST( 'y',	0,        0,     0 ), /*   379 T_Noquery         */
+  S_ST( 't',	0,        0,     0 ), /*   380 T_Noselect        */
+  S_ST( 'e',	0,        0,     0 ), /*   381 T_Noserve         */
+  S_ST( 'p',	0,        0,     0 ), /*   382 T_Notrap          */
+  S_ST( 't',	0,        0,     0 ), /*   383 T_Notrust         */
+  S_ST( 'p',	0,      676,     0 ), /*   384 T_Ntp             */
+  S_ST( 't',	0,        0,     0 ), /*   385 T_Ntpport         */
+  S_ST( 't',	1,        0,     0 ), /*   386 T_NtpSignDsocket  */
+  S_ST( 'n',	0,      691,     0 ), /*   387 T_Orphan          */
+  S_ST( 't',	0,        0,     0 ), /*   388 T_Orphanwait      */
+  S_ST( 'y',	0,        0,     0 ), /*   389 T_PCEdigest       */
+  S_ST( 'c',	0,        0,     0 ), /*   390 T_Panic           */
+  S_ST( 'r',	1,      718,     0 ), /*   391 T_Peer            */
+  S_ST( 's',	0,        0,     0 ), /*   392 T_Peerstats       */
+  S_ST( 'e',	2,        0,     0 ), /*   393 T_Phone           */
+  S_ST( 'd',	0,      726,     0 ), /*   394 T_Pid             */
+  S_ST( 'e',	1,        0,     0 ), /*   395 T_Pidfile         */
+  S_ST( 'l',	0,      731,     0 ), /*   396 T_Poll            */
+  S_ST( 't',	0,        0,     0 ), /*   397 T_PollSkewList    */
+  S_ST( 'l',	1,        0,     0 ), /*   398 T_Pool            */
+  S_ST( 't',	0,        0,     0 ), /*   399 T_Port            */
+  S_ST( 't',	0,        0,     0 ), /*   400 T_Preempt         */
+  S_ST( 'r',	0,        0,     0 ), /*   401 T_Prefer          */
+  S_ST( 's',	0,        0,     0 ), /*   402 T_Protostats      */
+  S_ST( 'w',	1,        0,   740 ), /*   403 T_Pw              */
+  S_ST( 'e',	1,        0,     0 ), /*   404 T_Randfile        */
+  S_ST( 's',	0,        0,     0 ), /*   405 T_Rawstats        */
+  S_ST( 'd',	1,        0,     0 ), /*   406 T_Refid           */
+  S_ST( 'y',	0,        0,     0 ), /*   407 T_Requestkey      */
+  S_ST( 't',	0,        0,     0 ), /*   408 T_Reset           */
+  S_ST( 't',	0,        0,     0 ), /*   409 T_Restrict        */
+  S_ST( 'e',	0,        0,     0 ), /*   410 T_Revoke          */
+  S_ST( 't',	0,        0,     0 ), /*   411 T_Rlimit          */
+  S_ST( 'r',	1,        0,     0 ), /*   412 T_Saveconfigdir   */
+  S_ST( 'r',	1,      823,     0 ), /*   413 T_Server          */
+  S_ST( 'e',	0,        0,     0 ), /*   414 T_Serverresponse  */
+  S_ST( 'j',	3,      427,   208 ), /*   415                   */
+  S_ST( 'r',	1,        0,     0 ), /*   416 T_Setvar          */
+  S_ST( 'e',	0,        0,     0 ), /*   417 T_Source          */
+  S_ST( 'e',	0,        0,     0 ), /*   418 T_Stacksize       */
+  S_ST( 's',	0,        0,     0 ), /*   419 T_Statistics      */
+  S_ST( 's',	0,      867,   862 ), /*   420 T_Stats           */
+  S_ST( 'r',	1,        0,     0 ), /*   421 T_Statsdir        */
+  S_ST( 'p',	0,      875,     0 ), /*   422 T_Step            */
+  S_ST( 'k',	0,        0,     0 ), /*   423 T_Stepback        */
+  S_ST( 'd',	0,        0,     0 ), /*   424 T_Stepfwd         */
+  S_ST( 't',	0,        0,     0 ), /*   425 T_Stepout         */
+  S_ST( 'm',	0,        0,     0 ), /*   426 T_Stratum         */
+  S_ST( 'i',	3,      442,     0 ), /*   427 j                 */
+  S_ST( 's',	0,      882,     0 ), /*   428 T_Sys             */
+  S_ST( 's',	0,        0,     0 ), /*   429 T_Sysstats        */
+  S_ST( 'k',	0,        0,     0 ), /*   430 T_Tick            */
+  S_ST( '1',	0,        0,     0 ), /*   431 T_Time1           */
+  S_ST( '2',	0,        0,   431 ), /*   432 T_Time2           */
+  S_ST( 'r',	0,        0,   432 ), /*   433 T_Timer           */
+  S_ST( 's',	0,        0,     0 ), /*   434 T_Timingstats     */
+  S_ST( 'r',	0,        0,     0 ), /*   435 T_Tinker          */
+  S_ST( 's',	0,        0,     0 ), /*   436 T_Tos             */
+  S_ST( 'p',	1,        0,     0 ), /*   437 T_Trap            */
+  S_ST( 'e',	0,        0,     0 ), /*   438 T_True            */
+  S_ST( 'y',	0,        0,     0 ), /*   439 T_Trustedkey      */
+  S_ST( 'l',	0,        0,     0 ), /*   440 T_Ttl             */
+  S_ST( 'e',	0,        0,     0 ), /*   441 T_Type            */
+  S_ST( 't',	3,      449,     0 ), /*   442 ji                */
+  S_ST( 'y',	0,        0,     0 ), /*   443 T_UEcrypto        */
+  S_ST( 'y',	0,        0,     0 ), /*   444 T_UEcryptonak     */
+  S_ST( 'y',	0,        0,     0 ), /*   445 T_UEdigest        */
+  S_ST( 'g',	1,        0,     0 ), /*   446 T_Unconfig        */
+  S_ST( 'r',	1,      924,     0 ), /*   447 T_Unpeer          */
+  S_ST( 'n',	0,        0,     0 ), /*   448 T_Version         */
+  S_ST( 't',	3,      455,     0 ), /*   449 jit               */
+  S_ST( 'k',	0,        0,     0 ), /*   450 T_Week            */
+  S_ST( 'd',	0,        0,     0 ), /*   451 T_Wildcard        */
+  S_ST( 'e',	0,        0,     0 ), /*   452 T_Xleave          */
+  S_ST( 'e',	0,        0,     0 ), /*   453 T_Xmtnonce        */
+  S_ST( 'r',	0,        0,     0 ), /*   454 T_Year            */
+  S_ST( 'e',	3,      464,     0 ), /*   455 jitt              */
+  S_ST( 'k',	3,      473,   415 ), /*   456                   */
+  S_ST( 'e',	0,        0,     0 ), /*   457 T_Simulate        */
+  S_ST( 'y',	0,        0,     0 ), /*   458 T_Beep_Delay      */
+  S_ST( 'n',	0,        0,     0 ), /*   459 T_Sim_Duration    */
+  S_ST( 't',	0,        0,     0 ), /*   460 T_Server_Offset   */
+  S_ST( 'n',	0,        0,     0 ), /*   461 T_Duration        */
+  S_ST( 't',	0,        0,     0 ), /*   462 T_Freq_Offset     */
+  S_ST( 'r',	0,        0,     0 ), /*   463 T_Wander          */
+  S_ST( 'r',	0,        0,     0 ), /*   464 T_Jitter          */
+  S_ST( 'y',	0,        0,     0 ), /*   465 T_Prop_Delay      */
+  S_ST( 'y',	0,        0,     0 ), /*   466 T_Proc_Delay      */
+  S_ST( 'e',	3,      332,     0 ), /*   467 k                 */
+  S_ST( 'r',	3,      469,     0 ), /*   468 ke                */
+  S_ST( 'n',	3,      470,     0 ), /*   469 ker               */
+  S_ST( 'e',	3,      331,     0 ), /*   470 kern              */
+  S_ST( 'd',	3,      472,     0 ), /*   471 keys              */
+  S_ST( 'i',	3,      334,     0 ), /*   472 keysd             */
+  S_ST( 'o',	3,      335,   467 ), /*   473 k                 */
+  S_ST( 'l',	3,      502,   456 ), /*   474                   */
+  S_ST( 'e',	3,      476,     0 ), /*   475 l                 */
+  S_ST( 'a',	3,      477,     0 ), /*   476 le                */
+  S_ST( 'p',	3,      481,     0 ), /*   477 lea               */
+  S_ST( 'f',	3,      479,     0 ), /*   478 leap              */
+  S_ST( 'i',	3,      480,     0 ), /*   479 leapf             */
+  S_ST( 'l',	3,      336,     0 ), /*   480 leapfi            */
+  S_ST( 's',	3,      482,   478 ), /*   481 leap              */
+  S_ST( 'm',	3,      483,     0 ), /*   482 leaps             */
+  S_ST( 'e',	3,      484,     0 ), /*   483 leapsm            */
+  S_ST( 'a',	3,      485,     0 ), /*   484 leapsme           */
+  S_ST( 'r',	3,      486,     0 ), /*   485 leapsmea          */
+  S_ST( 'i',	3,      487,     0 ), /*   486 leapsmear         */
+  S_ST( 'n',	3,      488,     0 ), /*   487 leapsmeari        */
+  S_ST( 't',	3,      489,     0 ), /*   488 leapsmearin       */
+  S_ST( 'e',	3,      490,     0 ), /*   489 leapsmearint      */
+  S_ST( 'r',	3,      491,     0 ), /*   490 leapsmearinte     */
+  S_ST( 'v',	3,      492,     0 ), /*   491 leapsmearinter    */
+  S_ST( 'a',	3,      337,     0 ), /*   492 leapsmearinterv   */
+  S_ST( 'i',	3,      499,   475 ), /*   493 l                 */
+  S_ST( 'm',	3,      495,     0 ), /*   494 li                */
+  S_ST( 'i',	3,      496,     0 ), /*   495 lim               */
+  S_ST( 't',	3,      497,     0 ), /*   496 limi              */
+  S_ST( 'e',	3,      338,     0 ), /*   497 limit             */
+  S_ST( 'n',	3,      339,   494 ), /*   498 li                */
+  S_ST( 's',	3,      500,   498 ), /*   499 li                */
+  S_ST( 't',	3,      501,     0 ), /*   500 lis               */
+  S_ST( 'e',	3,      340,     0 ), /*   501 list              */
+  S_ST( 'o',	3,      518,   493 ), /*   502 l                 */
+  S_ST( 'g',	3,      509,     0 ), /*   503 lo                */
+  S_ST( 'c',	3,      505,     0 ), /*   504 log               */
+  S_ST( 'o',	3,      506,     0 ), /*   505 logc              */
+  S_ST( 'n',	3,      507,     0 ), /*   506 logco             */
+  S_ST( 'f',	3,      508,     0 ), /*   507 logcon            */
+  S_ST( 'i',	3,      341,     0 ), /*   508 logconf           */
+  S_ST( 'f',	3,      510,   504 ), /*   509 log               */
+  S_ST( 'i',	3,      511,     0 ), /*   510 logf              */
+  S_ST( 'l',	3,      342,     0 ), /*   511 logfi             */
+  S_ST( 'o',	3,      513,   503 ), /*   512 lo                */
+  S_ST( 'p',	3,      514,     0 ), /*   513 loo               */
+  S_ST( 's',	3,      515,     0 ), /*   514 loop              */
+  S_ST( 't',	3,      516,     0 ), /*   515 loops             */
+  S_ST( 'a',	3,      517,     0 ), /*   516 loopst            */
+  S_ST( 't',	3,      343,     0 ), /*   517 loopsta           */
+  S_ST( 'w',	3,      519,   512 ), /*   518 lo                */
+  S_ST( 'p',	3,      520,     0 ), /*   519 low               */
+  S_ST( 'r',	3,      521,     0 ), /*   520 lowp              */
+  S_ST( 'i',	3,      522,     0 ), /*   521 lowpr             */
+  S_ST( 'o',	3,      523,     0 ), /*   522 lowpri            */
+  S_ST( 't',	3,      524,     0 ), /*   523 lowprio           */
+  S_ST( 'r',	3,      525,     0 ), /*   524 lowpriot          */
+  S_ST( 'a',	3,      344,     0 ), /*   525 lowpriotr         */
+  S_ST( 'm',	3,      612,   474 ), /*   526                   */
+  S_ST( 'a',	3,      545,     0 ), /*   527 m                 */
+  S_ST( 'n',	3,      529,     0 ), /*   528 ma                */
+  S_ST( 'y',	3,      530,     0 ), /*   529 man               */
+  S_ST( 'c',	3,      531,     0 ), /*   530 many              */
+  S_ST( 'a',	3,      532,     0 ), /*   531 manyc             */
+  S_ST( 's',	3,      533,     0 ), /*   532 manyca            */
+  S_ST( 't',	3,      539,     0 ), /*   533 manycas           */
+  S_ST( 'c',	3,      535,     0 ), /*   534 manycast          */
+  S_ST( 'l',	3,      536,     0 ), /*   535 manycastc         */
+  S_ST( 'i',	3,      537,     0 ), /*   536 manycastcl        */
+  S_ST( 'e',	3,      538,     0 ), /*   537 manycastcli       */
+  S_ST( 'n',	3,      345,     0 ), /*   538 manycastclie      */
+  S_ST( 's',	3,      540,   534 ), /*   539 manycast          */
+  S_ST( 'e',	3,      541,     0 ), /*   540 manycasts         */
+  S_ST( 'r',	3,      542,     0 ), /*   541 manycastse        */
+  S_ST( 'v',	3,      543,     0 ), /*   542 manycastser       */
+  S_ST( 'e',	3,      346,     0 ), /*   543 manycastserv      */
+  S_ST( 's',	3,      347,   528 ), /*   544 ma                */
+  S_ST( 'x',	3,      560,   544 ), /*   545 ma                */
+  S_ST( 'a',	3,      547,     0 ), /*   546 max               */
+  S_ST( 'g',	3,      348,     0 ), /*   547 maxa              */
+  S_ST( 'c',	3,      549,   546 ), /*   548 max               */
+  S_ST( 'l',	3,      550,     0 ), /*   549 maxc              */
+  S_ST( 'o',	3,      551,     0 ), /*   550 maxcl             */
+  S_ST( 'c',	3,      349,     0 ), /*   551 maxclo            */
+  S_ST( 'd',	3,      556,   548 ), /*   552 max               */
+  S_ST( 'e',	3,      554,     0 ), /*   553 maxd              */
+  S_ST( 'p',	3,      555,     0 ), /*   554 maxde             */
+  S_ST( 't',	3,      350,     0 ), /*   555 maxdep            */
+  S_ST( 'i',	3,      557,   553 ), /*   556 maxd              */
+  S_ST( 's',	3,      351,     0 ), /*   557 maxdi             */
+  S_ST( 'm',	3,      559,   552 ), /*   558 max               */
+  S_ST( 'e',	3,      352,     0 ), /*   559 maxm              */
+  S_ST( 'p',	3,      561,   558 ), /*   560 max               */
+  S_ST( 'o',	3,      562,     0 ), /*   561 maxp              */
+  S_ST( 'l',	3,      353,     0 ), /*   562 maxpo             */
+  S_ST( 'd',	3,      564,   527 ), /*   563 m                 */
+  S_ST( 'n',	3,      565,     0 ), /*   564 md                */
+  S_ST( 's',	3,      566,     0 ), /*   565 mdn               */
+  S_ST( 't',	3,      567,     0 ), /*   566 mdns              */
+  S_ST( 'r',	3,      568,     0 ), /*   567 mdnst             */
+  S_ST( 'i',	3,      569,     0 ), /*   568 mdnstr            */
+  S_ST( 'e',	3,      354,     0 ), /*   569 mdnstri           */
+  S_ST( 'e',	3,      355,   563 ), /*   570 m                 */
+  S_ST( 'l',	3,      572,     0 ), /*   571 mem               */
+  S_ST( 'o',	3,      573,     0 ), /*   572 meml              */
+  S_ST( 'c',	3,      356,     0 ), /*   573 memlo             */
+  S_ST( 'i',	3,      575,   570 ), /*   574 m                 */
+  S_ST( 'n',	3,      597,     0 ), /*   575 mi                */
+  S_ST( 'c',	3,      577,     0 ), /*   576 min               */
+  S_ST( 'l',	3,      578,     0 ), /*   577 minc              */
+  S_ST( 'o',	3,      579,     0 ), /*   578 mincl             */
+  S_ST( 'c',	3,      357,     0 ), /*   579 minclo            */
+  S_ST( 'd',	3,      584,   576 ), /*   580 min               */
+  S_ST( 'e',	3,      582,     0 ), /*   581 mind              */
+  S_ST( 'p',	3,      583,     0 ), /*   582 minde             */
+  S_ST( 't',	3,      358,     0 ), /*   583 mindep            */
+  S_ST( 'i',	3,      585,   581 ), /*   584 mind              */
+  S_ST( 's',	3,      359,     0 ), /*   585 mindi             */
+  S_ST( 'i',	3,      587,   580 ), /*   586 min               */
+  S_ST( 'm',	3,      588,     0 ), /*   587 mini              */
+  S_ST( 'u',	3,      360,     0 ), /*   588 minim             */
+  S_ST( 'j',	3,      590,   586 ), /*   589 min               */
+  S_ST( 'i',	3,      591,     0 ), /*   590 minj              */
+  S_ST( 't',	3,      592,     0 ), /*   591 minji             */
+  S_ST( 't',	3,      593,     0 ), /*   592 minjit            */
+  S_ST( 'e',	3,      361,     0 ), /*   593 minjitt           */
+  S_ST( 'p',	3,      595,   589 ), /*   594 min               */
+  S_ST( 'o',	3,      596,     0 ), /*   595 minp              */
+  S_ST( 'l',	3,      362,     0 ), /*   596 minpo             */
+  S_ST( 's',	3,      598,   594 ), /*   597 min               */
+  S_ST( 'a',	3,      599,     0 ), /*   598 mins              */
+  S_ST( 'n',	3,      363,     0 ), /*   599 minsa             */
+  S_ST( 'o',	3,      602,   574 ), /*   600 m                 */
+  S_ST( 'd',	3,      364,     0 ), /*   601 mo                */
+  S_ST( 'n',	3,      606,   601 ), /*   602 mo                */
+  S_ST( 'i',	3,      604,     0 ), /*   603 mon               */
+  S_ST( 't',	3,      605,     0 ), /*   604 moni              */
+  S_ST( 'o',	3,      366,     0 ), /*   605 monit             */
+  S_ST( 't',	3,      367,   603 ), /*   606 mon               */
+  S_ST( 'r',	3,      368,   600 ), /*   607 m                 */
+  S_ST( 's',	3,      609,   607 ), /*   608 m                 */
+  S_ST( 's',	3,      610,     0 ), /*   609 ms                */
+  S_ST( 'n',	3,      611,     0 ), /*   610 mss               */
+  S_ST( 't',	3,      369,     0 ), /*   611 mssn              */
+  S_ST( 'u',	3,      613,   608 ), /*   612 m                 */
+  S_ST( 'l',	3,      614,     0 ), /*   613 mu                */
+  S_ST( 't',	3,      615,     0 ), /*   614 mul               */
+  S_ST( 'i',	3,      616,     0 ), /*   615 mult              */
+  S_ST( 'c',	3,      617,     0 ), /*   616 multi             */
+  S_ST( 'a',	3,      618,     0 ), /*   617 multic            */
+  S_ST( 's',	3,      619,     0 ), /*   618 multica           */
+  S_ST( 't',	3,      620,     0 ), /*   619 multicas          */
+  S_ST( 'c',	3,      621,     0 ), /*   620 multicast         */
+  S_ST( 'l',	3,      622,     0 ), /*   621 multicastc        */
+  S_ST( 'i',	3,      623,     0 ), /*   622 multicastcl       */
+  S_ST( 'e',	3,      624,     0 ), /*   623 multicastcli      */
+  S_ST( 'n',	3,      370,     0 ), /*   624 multicastclie     */
+  S_ST( 'n',	3,      672,   526 ), /*   625                   */
+  S_ST( 'i',	3,      371,     0 ), /*   626 n                 */
+  S_ST( 'o',	3,      667,   626 ), /*   627 n                 */
+  S_ST( 'e',	3,      629,     0 ), /*   628 no                */
+  S_ST( 'p',	3,      630,     0 ), /*   629 noe               */
+  S_ST( 'e',	3,      631,     0 ), /*   630 noep              */
+  S_ST( 'e',	3,      377,     0 ), /*   631 noepe             */
+  S_ST( 'l',	3,      633,   628 ), /*   632 no                */
+  S_ST( 'i',	3,      634,     0 ), /*   633 nol               */
+  S_ST( 'n',	3,      372,     0 ), /*   634 noli              */
+  S_ST( 'm',	3,      640,   632 ), /*   635 no                */
+  S_ST( 'o',	3,      637,     0 ), /*   636 nom               */
+  S_ST( 'd',	3,      638,     0 ), /*   637 nomo              */
+  S_ST( 'i',	3,      639,     0 ), /*   638 nomod             */
+  S_ST( 'f',	3,      373,     0 ), /*   639 nomodi            */
+  S_ST( 'r',	3,      641,   636 ), /*   640 nom               */
+  S_ST( 'u',	3,      642,     0 ), /*   641 nomr              */
+  S_ST( 'l',	3,      643,     0 ), /*   642 nomru             */
+  S_ST( 'i',	3,      644,     0 ), /*   643 nomrul            */
+  S_ST( 's',	3,      374,     0 ), /*   644 nomruli           */
+  S_ST( 'n',	3,      646,   635 ), /*   645 no                */
+  S_ST( 'v',	3,      647,   375 ), /*   646 non               */
+  S_ST( 'o',	3,      648,     0 ), /*   647 nonv              */
+  S_ST( 'l',	3,      649,     0 ), /*   648 nonvo             */
+  S_ST( 'a',	3,      650,     0 ), /*   649 nonvol            */
+  S_ST( 't',	3,      651,     0 ), /*   650 nonvola           */
+  S_ST( 'i',	3,      652,     0 ), /*   651 nonvolat          */
+  S_ST( 'l',	3,      376,     0 ), /*   652 nonvolati         */
+  S_ST( 'p',	3,      654,   645 ), /*   653 no                */
+  S_ST( 'e',	3,      655,     0 ), /*   654 nop               */
+  S_ST( 'e',	3,      378,     0 ), /*   655 nope              */
+  S_ST( 'q',	3,      657,   653 ), /*   656 no                */
+  S_ST( 'u',	3,      658,     0 ), /*   657 noq               */
+  S_ST( 'e',	3,      659,     0 ), /*   658 noqu              */
+  S_ST( 'r',	3,      379,     0 ), /*   659 noque             */
+  S_ST( 's',	3,      661,   656 ), /*   660 no                */
+  S_ST( 'e',	3,      665,     0 ), /*   661 nos               */
+  S_ST( 'l',	3,      663,     0 ), /*   662 nose              */
+  S_ST( 'e',	3,      664,     0 ), /*   663 nosel             */
+  S_ST( 'c',	3,      380,     0 ), /*   664 nosele            */
+  S_ST( 'r',	3,      666,   662 ), /*   665 nose              */
+  S_ST( 'v',	3,      381,     0 ), /*   666 noser             */
+  S_ST( 't',	3,      668,   660 ), /*   667 no                */
+  S_ST( 'r',	3,      670,     0 ), /*   668 not               */
+  S_ST( 'a',	3,      382,     0 ), /*   669 notr              */
+  S_ST( 'u',	3,      671,   669 ), /*   670 notr              */
+  S_ST( 's',	3,      383,     0 ), /*   671 notru             */
+  S_ST( 't',	3,      384,   627 ), /*   672 n                 */
+  S_ST( 'p',	3,      674,     0 ), /*   673 ntp               */
+  S_ST( 'o',	3,      675,     0 ), /*   674 ntpp              */
+  S_ST( 'r',	3,      385,     0 ), /*   675 ntppo             */
+  S_ST( 's',	3,      677,   673 ), /*   676 ntp               */
+  S_ST( 'i',	3,      678,     0 ), /*   677 ntps              */
+  S_ST( 'g',	3,      679,     0 ), /*   678 ntpsi             */
+  S_ST( 'n',	3,      680,     0 ), /*   679 ntpsig            */
+  S_ST( 'd',	3,      681,     0 ), /*   680 ntpsign           */
+  S_ST( 's',	3,      682,     0 ), /*   681 ntpsignd          */
+  S_ST( 'o',	3,      683,     0 ), /*   682 ntpsignds         */
+  S_ST( 'c',	3,      684,     0 ), /*   683 ntpsigndso        */
+  S_ST( 'k',	3,      685,     0 ), /*   684 ntpsigndsoc       */
+  S_ST( 'e',	3,      386,     0 ), /*   685 ntpsigndsock      */
+  S_ST( 'o',	3,      687,   625 ), /*   686                   */
+  S_ST( 'r',	3,      688,     0 ), /*   687 o                 */
+  S_ST( 'p',	3,      689,     0 ), /*   688 or                */
+  S_ST( 'h',	3,      690,     0 ), /*   689 orp               */
+  S_ST( 'a',	3,      387,     0 ), /*   690 orph              */
+  S_ST( 'w',	3,      692,     0 ), /*   691 orphan            */
+  S_ST( 'a',	3,      693,     0 ), /*   692 orphanw           */
+  S_ST( 'i',	3,      388,     0 ), /*   693 orphanwa          */
+  S_ST( 'p',	3,      403,   686 ), /*   694                   */
+  S_ST( 'a',	3,      696,     0 ), /*   695 p                 */
+  S_ST( 'n',	3,      697,     0 ), /*   696 pa                */
+  S_ST( 'i',	3,      390,     0 ), /*   697 pan               */
+  S_ST( 'e',	3,      699,   695 ), /*   698 p                 */
+  S_ST( 'e',	3,      391,     0 ), /*   699 pe                */
+  S_ST( '_',	3,      701,     0 ), /*   700 peer              */
+  S_ST( 'c',	3,      702,     0 ), /*   701 peer_             */
+  S_ST( 'l',	3,      703,     0 ), /*   702 peer_c            */
+  S_ST( 'e',	3,      704,     0 ), /*   703 peer_cl           */
+  S_ST( 'a',	3,      705,     0 ), /*   704 peer_cle          */
+  S_ST( 'r',	3,      706,     0 ), /*   705 peer_clea         */
+  S_ST( '_',	3,      707,     0 ), /*   706 peer_clear        */
+  S_ST( 'd',	3,      708,     0 ), /*   707 peer_clear_       */
+  S_ST( 'i',	3,      709,     0 ), /*   708 peer_clear_d      */
+  S_ST( 'g',	3,      710,     0 ), /*   709 peer_clear_di     */
+  S_ST( 'e',	3,      711,     0 ), /*   710 peer_clear_dig    */
+  S_ST( 's',	3,      712,     0 ), /*   711 peer_clear_dige   */
+  S_ST( 't',	3,      713,     0 ), /*   712 peer_clear_diges  */
+  S_ST( '_',	3,      714,     0 ), /*   713 peer_clear_digest */
+  S_ST( 'e',	3,      715,     0 ), /*   714 peer_clear_digest_ */
+  S_ST( 'a',	3,      716,     0 ), /*   715 peer_clear_digest_e */
+  S_ST( 'r',	3,      717,     0 ), /*   716 peer_clear_digest_ea */
+  S_ST( 'l',	3,      389,     0 ), /*   717 peer_clear_digest_ear */
+  S_ST( 's',	3,      719,   700 ), /*   718 peer              */
+  S_ST( 't',	3,      720,     0 ), /*   719 peers             */
+  S_ST( 'a',	3,      721,     0 ), /*   720 peerst            */
+  S_ST( 't',	3,      392,     0 ), /*   721 peersta           */
+  S_ST( 'h',	3,      723,   698 ), /*   722 p                 */
+  S_ST( 'o',	3,      724,     0 ), /*   723 ph                */
+  S_ST( 'n',	3,      393,     0 ), /*   724 pho               */
+  S_ST( 'i',	3,      394,   722 ), /*   725 p                 */
+  S_ST( 'f',	3,      727,     0 ), /*   726 pid               */
+  S_ST( 'i',	3,      728,     0 ), /*   727 pidf              */
+  S_ST( 'l',	3,      395,     0 ), /*   728 pidfi             */
+  S_ST( 'o',	3,      739,   725 ), /*   729 p                 */
+  S_ST( 'l',	3,      396,     0 ), /*   730 po                */
+  S_ST( 's',	3,      732,     0 ), /*   731 poll              */
+  S_ST( 'k',	3,      733,     0 ), /*   732 polls             */
+  S_ST( 'e',	3,      734,     0 ), /*   733 pollsk            */
+  S_ST( 'w',	3,      735,     0 ), /*   734 pollske           */
+  S_ST( 'l',	3,      736,     0 ), /*   735 pollskew          */
+  S_ST( 'i',	3,      737,     0 ), /*   736 pollskewl         */
+  S_ST( 's',	3,      397,     0 ), /*   737 pollskewli        */
+  S_ST( 'o',	3,      398,   730 ), /*   738 po                */
+  S_ST( 'r',	3,      399,   738 ), /*   739 po                */
+  S_ST( 'r',	3,      747,   729 ), /*   740 p                 */
+  S_ST( 'e',	3,      745,     0 ), /*   741 pr                */
+  S_ST( 'e',	3,      743,     0 ), /*   742 pre               */
+  S_ST( 'm',	3,      744,     0 ), /*   743 pree              */
+  S_ST( 'p',	3,      400,     0 ), /*   744 preem             */
+  S_ST( 'f',	3,      746,   742 ), /*   745 pre               */
+  S_ST( 'e',	3,      401,     0 ), /*   746 pref              */
+  S_ST( 'o',	3,      760,   741 ), /*   747 pr                */
+  S_ST( 'c',	3,      749,     0 ), /*   748 pro               */
+  S_ST( '_',	3,      750,     0 ), /*   749 proc              */
+  S_ST( 'd',	3,      751,     0 ), /*   750 proc_             */
+  S_ST( 'e',	3,      752,     0 ), /*   751 proc_d            */
+  S_ST( 'l',	3,      753,     0 ), /*   752 proc_de           */
+  S_ST( 'a',	3,      466,     0 ), /*   753 proc_del          */
+  S_ST( 'p',	3,      755,   748 ), /*   754 pro               */
+  S_ST( '_',	3,      756,     0 ), /*   755 prop              */
+  S_ST( 'd',	3,      757,     0 ), /*   756 prop_             */
+  S_ST( 'e',	3,      758,     0 ), /*   757 prop_d            */
+  S_ST( 'l',	3,      759,     0 ), /*   758 prop_de           */
+  S_ST( 'a',	3,      465,     0 ), /*   759 prop_del          */
+  S_ST( 't',	3,      761,   754 ), /*   760 pro               */
+  S_ST( 'o',	3,      762,     0 ), /*   761 prot              */
+  S_ST( 's',	3,      763,     0 ), /*   762 proto             */
+  S_ST( 't',	3,      764,     0 ), /*   763 protos            */
+  S_ST( 'a',	3,      765,     0 ), /*   764 protost           */
+  S_ST( 't',	3,      402,     0 ), /*   765 protosta          */
+  S_ST( 'r',	3,      797,   694 ), /*   766                   */
+  S_ST( 'a',	3,      773,     0 ), /*   767 r                 */
+  S_ST( 'n',	3,      769,     0 ), /*   768 ra                */
+  S_ST( 'd',	3,      770,     0 ), /*   769 ran               */
+  S_ST( 'f',	3,      771,     0 ), /*   770 rand              */
+  S_ST( 'i',	3,      772,     0 ), /*   771 randf             */
+  S_ST( 'l',	3,      404,     0 ), /*   772 randfi            */
+  S_ST( 'w',	3,      774,   768 ), /*   773 ra                */
+  S_ST( 's',	3,      775,     0 ), /*   774 raw               */
+  S_ST( 't',	3,      776,     0 ), /*   775 raws              */
+  S_ST( 'a',	3,      777,     0 ), /*   776 rawst             */
+  S_ST( 't',	3,      405,     0 ), /*   777 rawsta            */
+  S_ST( 'e',	3,      794,   767 ), /*   778 r                 */
+  S_ST( 'f',	3,      780,     0 ), /*   779 re                */
+  S_ST( 'i',	3,      406,     0 ), /*   780 ref               */
+  S_ST( 'q',	3,      782,   779 ), /*   781 re                */
+  S_ST( 'u',	3,      783,     0 ), /*   782 req               */
+  S_ST( 'e',	3,      784,     0 ), /*   783 requ              */
+  S_ST( 's',	3,      785,     0 ), /*   784 reque             */
+  S_ST( 't',	3,      786,     0 ), /*   785 reques            */
+  S_ST( 'k',	3,      787,     0 ), /*   786 request           */
+  S_ST( 'e',	3,      407,     0 ), /*   787 requestk          */
+  S_ST( 's',	3,      790,   781 ), /*   788 re                */
+  S_ST( 'e',	3,      408,     0 ), /*   789 res               */
+  S_ST( 't',	3,      791,   789 ), /*   790 res               */
+  S_ST( 'r',	3,      792,     0 ), /*   791 rest              */
+  S_ST( 'i',	3,      793,     0 ), /*   792 restr             */
+  S_ST( 'c',	3,      409,     0 ), /*   793 restri            */
+  S_ST( 'v',	3,      795,   788 ), /*   794 re                */
+  S_ST( 'o',	3,      796,     0 ), /*   795 rev               */
+  S_ST( 'k',	3,      410,     0 ), /*   796 revo              */
+  S_ST( 'l',	3,      798,   778 ), /*   797 r                 */
+  S_ST( 'i',	3,      799,     0 ), /*   798 rl                */
+  S_ST( 'm',	3,      800,     0 ), /*   799 rli               */
+  S_ST( 'i',	3,      411,     0 ), /*   800 rlim              */
+  S_ST( 's',	3,      881,   766 ), /*   801                   */
+  S_ST( 'a',	3,      803,     0 ), /*   802 s                 */
+  S_ST( 'v',	3,      804,     0 ), /*   803 sa                */
+  S_ST( 'e',	3,      805,     0 ), /*   804 sav               */
+  S_ST( 'c',	3,      806,     0 ), /*   805 save              */
+  S_ST( 'o',	3,      807,     0 ), /*   806 savec             */
+  S_ST( 'n',	3,      808,     0 ), /*   807 saveco            */
+  S_ST( 'f',	3,      809,     0 ), /*   808 savecon           */
+  S_ST( 'i',	3,      810,     0 ), /*   809 saveconf          */
+  S_ST( 'g',	3,      811,     0 ), /*   810 saveconfi         */
+  S_ST( 'd',	3,      812,     0 ), /*   811 saveconfig        */
+  S_ST( 'i',	3,      412,     0 ), /*   812 saveconfigd       */
+  S_ST( 'e',	3,      830,   802 ), /*   813 s                 */
+  S_ST( 'r',	3,      815,     0 ), /*   814 se                */
+  S_ST( 'v',	3,      816,     0 ), /*   815 ser               */
+  S_ST( 'e',	3,      413,     0 ), /*   816 serv              */
+  S_ST( '_',	3,      818,     0 ), /*   817 server            */
+  S_ST( 'o',	3,      819,     0 ), /*   818 server_           */
+  S_ST( 'f',	3,      820,     0 ), /*   819 server_o          */
+  S_ST( 'f',	3,      821,     0 ), /*   820 server_of         */
+  S_ST( 's',	3,      822,     0 ), /*   821 server_off        */
+  S_ST( 'e',	3,      460,     0 ), /*   822 server_offs       */
+  S_ST( 'r',	3,      824,   817 ), /*   823 server            */
+  S_ST( 'e',	3,      825,     0 ), /*   824 serverr           */
+  S_ST( 's',	3,      826,     0 ), /*   825 serverre          */
+  S_ST( 'p',	3,      827,     0 ), /*   826 serverres         */
+  S_ST( 'o',	3,      828,     0 ), /*   827 serverresp        */
+  S_ST( 'n',	3,      829,     0 ), /*   828 serverrespo       */
+  S_ST( 's',	3,      414,     0 ), /*   829 serverrespon      */
+  S_ST( 't',	3,      831,   814 ), /*   830 se                */
+  S_ST( 'v',	3,      832,     0 ), /*   831 set               */
+  S_ST( 'a',	3,      416,     0 ), /*   832 setv              */
+  S_ST( 'i',	3,      834,   813 ), /*   833 s                 */
+  S_ST( 'm',	3,      835,     0 ), /*   834 si                */
+  S_ST( 'u',	3,      836,     0 ), /*   835 sim               */
+  S_ST( 'l',	3,      837,     0 ), /*   836 simu              */
+  S_ST( 'a',	3,      838,     0 ), /*   837 simul             */
+  S_ST( 't',	3,      839,     0 ), /*   838 simula            */
+  S_ST( 'i',	3,      840,   457 ), /*   839 simulat           */
+  S_ST( 'o',	3,      841,     0 ), /*   840 simulati          */
+  S_ST( 'n',	3,      842,     0 ), /*   841 simulatio         */
+  S_ST( '_',	3,      843,     0 ), /*   842 simulation        */
+  S_ST( 'd',	3,      844,     0 ), /*   843 simulation_       */
+  S_ST( 'u',	3,      845,     0 ), /*   844 simulation_d      */
+  S_ST( 'r',	3,      846,     0 ), /*   845 simulation_du     */
+  S_ST( 'a',	3,      847,     0 ), /*   846 simulation_dur    */
+  S_ST( 't',	3,      848,     0 ), /*   847 simulation_dura   */
+  S_ST( 'i',	3,      849,     0 ), /*   848 simulation_durat  */
+  S_ST( 'o',	3,      459,     0 ), /*   849 simulation_durati */
+  S_ST( 'o',	3,      851,   833 ), /*   850 s                 */
+  S_ST( 'u',	3,      852,     0 ), /*   851 so                */
+  S_ST( 'r',	3,      853,     0 ), /*   852 sou               */
+  S_ST( 'c',	3,      417,     0 ), /*   853 sour              */
+  S_ST( 't',	3,      877,   850 ), /*   854 s                 */
+  S_ST( 'a',	3,      861,     0 ), /*   855 st                */
+  S_ST( 'c',	3,      857,     0 ), /*   856 sta               */
+  S_ST( 'k',	3,      858,     0 ), /*   857 stac              */
+  S_ST( 's',	3,      859,     0 ), /*   858 stack             */
+  S_ST( 'i',	3,      860,     0 ), /*   859 stacks            */
+  S_ST( 'z',	3,      418,     0 ), /*   860 stacksi           */
+  S_ST( 't',	3,      420,   856 ), /*   861 sta               */
+  S_ST( 'i',	3,      863,     0 ), /*   862 stat              */
+  S_ST( 's',	3,      864,     0 ), /*   863 stati             */
+  S_ST( 't',	3,      865,     0 ), /*   864 statis            */
+  S_ST( 'i',	3,      866,     0 ), /*   865 statist           */
+  S_ST( 'c',	3,      419,     0 ), /*   866 statisti          */
+  S_ST( 'd',	3,      868,     0 ), /*   867 stats             */
+  S_ST( 'i',	3,      421,     0 ), /*   868 statsd            */
+  S_ST( 'e',	3,      422,   855 ), /*   869 st                */
+  S_ST( 'b',	3,      871,     0 ), /*   870 step              */
+  S_ST( 'a',	3,      872,     0 ), /*   871 stepb             */
+  S_ST( 'c',	3,      423,     0 ), /*   872 stepba            */
+  S_ST( 'f',	3,      874,   870 ), /*   873 step              */
+  S_ST( 'w',	3,      424,     0 ), /*   874 stepf             */
+  S_ST( 'o',	3,      876,   873 ), /*   875 step              */
+  S_ST( 'u',	3,      425,     0 ), /*   876 stepo             */
+  S_ST( 'r',	3,      878,   869 ), /*   877 st                */
+  S_ST( 'a',	3,      879,     0 ), /*   878 str               */
+  S_ST( 't',	3,      880,     0 ), /*   879 stra              */
+  S_ST( 'u',	3,      426,     0 ), /*   880 strat             */
+  S_ST( 'y',	3,      428,   854 ), /*   881 s                 */
+  S_ST( 's',	3,      883,     0 ), /*   882 sys               */
+  S_ST( 't',	3,      884,     0 ), /*   883 syss              */
+  S_ST( 'a',	3,      885,     0 ), /*   884 sysst             */
+  S_ST( 't',	3,      429,     0 ), /*   885 syssta            */
+  S_ST( 't',	3,      912,   801 ), /*   886                   */
+  S_ST( 'i',	3,      898,     0 ), /*   887 t                 */
+  S_ST( 'c',	3,      430,     0 ), /*   888 ti                */
+  S_ST( 'm',	3,      891,   888 ), /*   889 ti                */
+  S_ST( 'e',	3,      433,     0 ), /*   890 tim               */
+  S_ST( 'i',	3,      892,   890 ), /*   891 tim               */
+  S_ST( 'n',	3,      893,     0 ), /*   892 timi              */
+  S_ST( 'g',	3,      894,     0 ), /*   893 timin             */
+  S_ST( 's',	3,      895,     0 ), /*   894 timing            */
+  S_ST( 't',	3,      896,     0 ), /*   895 timings           */
+  S_ST( 'a',	3,      897,     0 ), /*   896 timingst          */
+  S_ST( 't',	3,      434,     0 ), /*   897 timingsta         */
+  S_ST( 'n',	3,      899,   889 ), /*   898 ti                */
+  S_ST( 'k',	3,      900,     0 ), /*   899 tin               */
+  S_ST( 'e',	3,      435,     0 ), /*   900 tink              */
+  S_ST( 'o',	3,      436,   887 ), /*   901 t                 */
+  S_ST( 'r',	3,      904,   901 ), /*   902 t                 */
+  S_ST( 'a',	3,      437,     0 ), /*   903 tr                */
+  S_ST( 'u',	3,      905,   903 ), /*   904 tr                */
+  S_ST( 's',	3,      906,   438 ), /*   905 tru               */
+  S_ST( 't',	3,      907,     0 ), /*   906 trus              */
+  S_ST( 'e',	3,      908,     0 ), /*   907 trust             */
+  S_ST( 'd',	3,      909,     0 ), /*   908 truste            */
+  S_ST( 'k',	3,      910,     0 ), /*   909 trusted           */
+  S_ST( 'e',	3,      439,     0 ), /*   910 trustedk          */
+  S_ST( 't',	3,      440,   902 ), /*   911 t                 */
+  S_ST( 'y',	3,      913,   911 ), /*   912 t                 */
+  S_ST( 'p',	3,      441,     0 ), /*   913 ty                */
+  S_ST( 'u',	3,      915,   886 ), /*   914                   */
+  S_ST( 'n',	3,      921,     0 ), /*   915 u                 */
+  S_ST( 'c',	3,      917,     0 ), /*   916 un                */
+  S_ST( 'o',	3,      918,     0 ), /*   917 unc               */
+  S_ST( 'n',	3,      919,     0 ), /*   918 unco              */
+  S_ST( 'f',	3,      920,     0 ), /*   919 uncon             */
+  S_ST( 'i',	3,      446,     0 ), /*   920 unconf            */
+  S_ST( 'p',	3,      922,   916 ), /*   921 un                */
+  S_ST( 'e',	3,      923,     0 ), /*   922 unp               */
+  S_ST( 'e',	3,      447,     0 ), /*   923 unpe              */
+  S_ST( '_',	3,      944,     0 ), /*   924 unpeer            */
+  S_ST( 'c',	3,      926,     0 ), /*   925 unpeer_           */
+  S_ST( 'r',	3,      927,     0 ), /*   926 unpeer_c          */
+  S_ST( 'y',	3,      928,     0 ), /*   927 unpeer_cr         */
+  S_ST( 'p',	3,      929,     0 ), /*   928 unpeer_cry        */
+  S_ST( 't',	3,      930,     0 ), /*   929 unpeer_cryp       */
+  S_ST( 'o',	3,      931,     0 ), /*   930 unpeer_crypt      */
+  S_ST( '_',	3,      936,     0 ), /*   931 unpeer_crypto     */
+  S_ST( 'e',	3,      933,     0 ), /*   932 unpeer_crypto_    */
+  S_ST( 'a',	3,      934,     0 ), /*   933 unpeer_crypto_e   */
+  S_ST( 'r',	3,      935,     0 ), /*   934 unpeer_crypto_ea  */
+  S_ST( 'l',	3,      443,     0 ), /*   935 unpeer_crypto_ear */
+  S_ST( 'n',	3,      937,   932 ), /*   936 unpeer_crypto_    */
+  S_ST( 'a',	3,      938,     0 ), /*   937 unpeer_crypto_n   */
+  S_ST( 'k',	3,      939,     0 ), /*   938 unpeer_crypto_na  */
+  S_ST( '_',	3,      940,     0 ), /*   939 unpeer_crypto_nak */
+  S_ST( 'e',	3,      941,     0 ), /*   940 unpeer_crypto_nak_ */
+  S_ST( 'a',	3,      942,     0 ), /*   941 unpeer_crypto_nak_e */
+  S_ST( 'r',	3,      943,     0 ), /*   942 unpeer_crypto_nak_ea */
+  S_ST( 'l',	3,      444,     0 ), /*   943 unpeer_crypto_nak_ear */
+  S_ST( 'd',	3,      945,   925 ), /*   944 unpeer_           */
+  S_ST( 'i',	3,      946,     0 ), /*   945 unpeer_d          */
+  S_ST( 'g',	3,      947,     0 ), /*   946 unpeer_di         */
+  S_ST( 'e',	3,      948,     0 ), /*   947 unpeer_dig        */
+  S_ST( 's',	3,      949,     0 ), /*   948 unpeer_dige       */
+  S_ST( 't',	3,      950,     0 ), /*   949 unpeer_diges      */
+  S_ST( '_',	3,      951,     0 ), /*   950 unpeer_digest     */
+  S_ST( 'e',	3,      952,     0 ), /*   951 unpeer_digest_    */
+  S_ST( 'a',	3,      953,     0 ), /*   952 unpeer_digest_e   */
+  S_ST( 'r',	3,      954,     0 ), /*   953 unpeer_digest_ea  */
+  S_ST( 'l',	3,      445,     0 ), /*   954 unpeer_digest_ear */
+  S_ST( 'v',	3,      956,   914 ), /*   955                   */
+  S_ST( 'e',	3,      957,     0 ), /*   956 v                 */
+  S_ST( 'r',	3,      958,     0 ), /*   957 ve                */
+  S_ST( 's',	3,      959,     0 ), /*   958 ver               */
+  S_ST( 'i',	3,      960,     0 ), /*   959 vers              */
+  S_ST( 'o',	3,      448,     0 ), /*   960 versi             */
+  S_ST( 'w',	3,      968,   955 ), /*   961                   */
+  S_ST( 'a',	3,      963,     0 ), /*   962 w                 */
+  S_ST( 'n',	3,      964,     0 ), /*   963 wa                */
+  S_ST( 'd',	3,      965,     0 ), /*   964 wan               */
+  S_ST( 'e',	3,      463,     0 ), /*   965 wand              */
+  S_ST( 'e',	3,      967,   962 ), /*   966 w                 */
+  S_ST( 'e',	3,      450,     0 ), /*   967 we                */
+  S_ST( 'i',	3,      969,   966 ), /*   968 w                 */
+  S_ST( 'l',	3,      970,     0 ), /*   969 wi                */
+  S_ST( 'd',	3,      971,     0 ), /*   970 wil               */
+  S_ST( 'c',	3,      972,     0 ), /*   971 wild              */
+  S_ST( 'a',	3,      973,     0 ), /*   972 wildc             */
+  S_ST( 'r',	3,      451,     0 ), /*   973 wildca            */
+  S_ST( 'x',	3,      979,   961 ), /*   974                   */
+  S_ST( 'l',	3,      976,     0 ), /*   975 x                 */
+  S_ST( 'e',	3,      977,     0 ), /*   976 xl                */
+  S_ST( 'a',	3,      978,     0 ), /*   977 xle               */
+  S_ST( 'v',	3,      452,     0 ), /*   978 xlea              */
+  S_ST( 'm',	3,      980,   975 ), /*   979 x                 */
+  S_ST( 't',	3,      981,     0 ), /*   980 xm                */
+  S_ST( 'n',	3,      982,     0 ), /*   981 xmt               */
+  S_ST( 'o',	3,      983,     0 ), /*   982 xmtn              */
+  S_ST( 'n',	3,      984,     0 ), /*   983 xmtno             */
+  S_ST( 'c',	3,      453,     0 ), /*   984 xmtnon            */
+  S_ST( 'y',	3,      986,   974 ), /*   985 [initial state]   */
+  S_ST( 'e',	3,      987,     0 ), /*   986 y                 */
+  S_ST( 'a',	3,      454,     0 )  /*   987 ye                */
 };
 
--- contrib/ntp/ntpd/ntp_leapsec.c.orig
+++ contrib/ntp/ntpd/ntp_leapsec.c
@@ -422,7 +422,8 @@
 leapsec_load_stream(
 	FILE       * ifp  ,
 	const char * fname,
-	int/*BOOL*/  logall)
+	int/*BOOL*/  logall,
+	int/*BOOL*/  vhash)
 {
 	leap_table_t *pt;
 	int           rcheck;
@@ -430,36 +431,37 @@
 	if (NULL == fname)
 		fname = "<unknown>";
 
-	rcheck = leapsec_validate((leapsec_reader)getc, ifp);
-	if (logall)
-		switch (rcheck)
-		{
-		case LSVALID_GOODHASH:
-			msyslog(LOG_NOTICE, "%s ('%s'): good hash signature",
-				logPrefix, fname);
-			break;
-
-		case LSVALID_NOHASH:
-			msyslog(LOG_ERR, "%s ('%s'): no hash signature",
-				logPrefix, fname);
-			break;
-		case LSVALID_BADHASH:
-			msyslog(LOG_ERR, "%s ('%s'): signature mismatch",
-				logPrefix, fname);
-			break;
-		case LSVALID_BADFORMAT:
-			msyslog(LOG_ERR, "%s ('%s'): malformed hash signature",
-				logPrefix, fname);
-			break;
-		default:
-			msyslog(LOG_ERR, "%s ('%s'): unknown error code %d",
-				logPrefix, fname, rcheck);
-			break;
-		}
-	if (rcheck < 0)
-		return FALSE;
-
-	rewind(ifp);
+	if (vhash) {
+		rcheck = leapsec_validate((leapsec_reader)getc, ifp);
+		if (logall)
+			switch (rcheck)
+			{
+			case LSVALID_GOODHASH:
+				msyslog(LOG_NOTICE, "%s ('%s'): good hash signature",
+					logPrefix, fname);
+				break;
+				
+			case LSVALID_NOHASH:
+				msyslog(LOG_ERR, "%s ('%s'): no hash signature",
+					logPrefix, fname);
+				break;
+			case LSVALID_BADHASH:
+				msyslog(LOG_ERR, "%s ('%s'): signature mismatch",
+					logPrefix, fname);
+				break;
+			case LSVALID_BADFORMAT:
+				msyslog(LOG_ERR, "%s ('%s'): malformed hash signature",
+					logPrefix, fname);
+				break;
+			default:
+				msyslog(LOG_ERR, "%s ('%s'): unknown error code %d",
+					logPrefix, fname, rcheck);
+				break;
+			}
+		if (rcheck < 0)
+			return FALSE;
+		rewind(ifp);
+	}
 	pt = leapsec_get_table(TRUE);
 	if (!leapsec_load(pt, (leapsec_reader)getc, ifp, TRUE)) {
 		switch (errno) {
@@ -498,7 +500,8 @@
 	const char  * fname,
 	struct stat * sb_old,
 	int/*BOOL*/   force,
-	int/*BOOL*/   logall)
+	int/*BOOL*/   logall,
+	int/*BOOL*/   vhash)
 {
 	FILE       * fp;
 	struct stat  sb_new;
@@ -551,7 +554,7 @@
 		return FALSE;
 	}
 
-	rc = leapsec_load_stream(fp, fname, logall);
+	rc = leapsec_load_stream(fp, fname, logall, vhash);
 	fclose(fp);
 	return rc;
 }
--- contrib/ntp/ntpd/ntp_leapsec.h.orig
+++ contrib/ntp/ntpd/ntp_leapsec.h
@@ -174,7 +174,7 @@
  * around the generic load function, 'leapsec_load()'.
  */
 extern int/*BOOL*/ leapsec_load_stream(FILE * fp, const char * fname,
-				       int/*BOOL*/logall);
+				       int/*BOOL*/logall, int/*BOOL*/vhash);
 
 /* Read a leap second file from file. It checks that the file exists and
  * (if 'force' is not applied) the ctime/mtime has changed since the
@@ -184,7 +184,8 @@
  * otherwise. Uses 'leapsec_load_stream()' internally.
  */
 extern int/*BOOL*/ leapsec_load_file(const char * fname, struct stat * sb,
-				     int/*BOOL*/force, int/*BOOL*/logall);
+				     int/*BOOL*/force, int/*BOOL*/logall,
+				     int/*BOOL*/vhash);
 
 /* Get the current leap data signature. This consists of the last
  * ransition, the table expiration, and the total TAI difference at the
--- contrib/ntp/ntpd/ntp_loopfilter.c.orig
+++ contrib/ntp/ntpd/ntp_loopfilter.c
@@ -15,6 +15,7 @@
 #include "ntp_io.h"
 #include "ntp_unixtime.h"
 #include "ntp_stdlib.h"
+#include "timexsup.h"
 
 #include <limits.h>
 #include <stdio.h>
@@ -167,6 +168,9 @@
 int	tc_counter;		/* jiggle counter */
 double	last_offset;		/* last offset (s) */
 
+u_int	tc_twinlo;		/* TC step down not before this time */
+u_int	tc_twinhi;		/* TC step up not before this time */ 
+
 /*
  * Huff-n'-puff filter variables
  */
@@ -761,30 +765,21 @@
 		if (ext_enable) {
 			ntv.modes = MOD_STATUS;
 		} else {
-#ifdef STA_NANO
-			ntv.modes = MOD_BITS | MOD_NANO;
-#else /* STA_NANO */
 			ntv.modes = MOD_BITS;
-#endif /* STA_NANO */
-			if (clock_offset < 0)
-				dtemp = -.5;
-			else
-				dtemp = .5;
+			ntv.offset = var_long_from_dbl(
+			    clock_offset, &ntv.modes);
 #ifdef STA_NANO
-			ntv.offset = (int32)(clock_offset * 1e9 +
-			    dtemp);
 			ntv.constant = sys_poll;
 #else /* STA_NANO */
-			ntv.offset = (int32)(clock_offset * 1e6 +
-			    dtemp);
 			ntv.constant = sys_poll - 4;
 #endif /* STA_NANO */
 			if (ntv.constant < 0)
 				ntv.constant = 0;
 
-			ntv.esterror = (u_int32)(clock_jitter * 1e6);
-			ntv.maxerror = (u_int32)((sys_rootdelay / 2 +
-			    sys_rootdisp) * 1e6);
+			ntv.esterror = usec_long_from_dbl(
+				clock_jitter);
+			ntv.maxerror = usec_long_from_dbl(
+				sys_rootdelay / 2 + sys_rootdisp);
 			ntv.status = STA_PLL;
 
 			/*
@@ -823,11 +818,7 @@
 			ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
 		}
 		pll_status = ntv.status;
-#ifdef STA_NANO
-		clock_offset = ntv.offset / 1e9;
-#else /* STA_NANO */
-		clock_offset = ntv.offset / 1e6;
-#endif /* STA_NANO */
+		clock_offset = dbl_from_var_long(ntv.offset, ntv.status);
 		clock_frequency = FREQTOD(ntv.freq);
 
 		/*
@@ -834,11 +825,8 @@
 		 * If the kernel PPS is lit, monitor its performance.
 		 */
 		if (ntv.status & STA_PPSTIME) {
-#ifdef STA_NANO
-			clock_jitter = ntv.jitter / 1e9;
-#else /* STA_NANO */
-			clock_jitter = ntv.jitter / 1e6;
-#endif /* STA_NANO */
+			clock_jitter = dbl_from_var_long(
+				ntv.jitter, ntv.status);
 		}
 
 #if defined(STA_NANO) && NTP_API == 4
@@ -888,34 +876,52 @@
 	 * increased, otherwise it is decreased. A bit of hysteresis
 	 * helps calm the dance. Works best using burst mode. Don't
 	 * fiddle with the poll during the startup clamp period.
+	 * [Bug 3615] also observe time gates to avoid eager stepping
 	 */
 	if (freq_cnt > 0) {
 		tc_counter = 0;
+		tc_twinlo  = current_time; 
+		tc_twinhi  = current_time; 
 	} else if (fabs(clock_offset) < CLOCK_PGATE * clock_jitter) {
 		tc_counter += sys_poll;
 		if (tc_counter > CLOCK_LIMIT) {
 			tc_counter = CLOCK_LIMIT;
-			if (sys_poll < peer->maxpoll) {
-				tc_counter = 0;
-				sys_poll++;
-			}
+			if (sys_poll < peer->maxpoll)
+				sys_poll += (current_time >= tc_twinhi);
 		}
 	} else {
 		tc_counter -= sys_poll << 1;
 		if (tc_counter < -CLOCK_LIMIT) {
 			tc_counter = -CLOCK_LIMIT;
-			if (sys_poll > peer->minpoll) {
-				tc_counter = 0;
-				sys_poll--;
-			}
+			if (sys_poll > peer->minpoll)
+				sys_poll -= (current_time >= tc_twinlo);
 		}
 	}
 
 	/*
 	 * If the time constant has changed, update the poll variables.
+	 *
+	 * [bug 3615] also set new time gates
+	 * The time limit for stepping down will be half the TC interval
+	 * or 60 secs from now, whatever is bigger, and the step up time
+	 * limit will be half the TC interval after the step down limit.
+	 *
+	 * The 'sys_poll' value affects the servo loop gain, and
+	 * overshooting sys_poll slows it down unnecessarily.  Stepping
+	 * down too fast also has bad effects.
+	 *
+	 * The 'tc_counter' dance itself is something that *should*
+	 * happen *once* every (1 << sys_poll) seconds, I think, but
+	 * that's not how it works right now, and adding time guards
+	 * seems the least intrusive way to handle this.
 	 */
-	if (osys_poll != sys_poll)
-		poll_update(peer, sys_poll);
+	if (osys_poll != sys_poll) {
+		u_int deadband = 1u << (sys_poll - 1);
+		tc_counter = 0;
+		tc_twinlo  = current_time + max(deadband, 60);
+		tc_twinhi  = tc_twinlo + deadband;
+		poll_update(peer, sys_poll, 0);
+	}
 
 	/*
 	 * Yibbidy, yibbbidy, yibbidy; that'h all folks.
--- contrib/ntp/ntpd/ntp_parser.c.orig
+++ contrib/ntp/ntpd/ntp_parser.c
@@ -62,7 +62,7 @@
 
 
 /* Copy the first part of user declarations.  */
-#line 11 "ntp_parser.y" /* yacc.c:339  */
+#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339  */
 
   #ifdef HAVE_CONFIG_H
   # include <config.h>
@@ -97,7 +97,7 @@
   #  define ONLY_SIM(a)	NULL
   #endif
 
-#line 101 "ntp_parser.c" /* yacc.c:339  */
+#line 101 "../../ntpd/ntp_parser.c" /* yacc.c:339  */
 
 # ifndef YY_NULLPTR
 #  if defined __cplusplus && 201103L <= __cplusplus
@@ -117,8 +117,8 @@
 
 /* In a future release of Bison, this section will be replaced
    by #include "y.tab.h".  */
-#ifndef YY_YY_NTP_PARSER_H_INCLUDED
-# define YY_YY_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
 /* Debug traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG 1
@@ -151,187 +151,196 @@
     T_Burst = 274,
     T_Calibrate = 275,
     T_Ceiling = 276,
-    T_Clockstats = 277,
-    T_Cohort = 278,
-    T_ControlKey = 279,
-    T_Crypto = 280,
-    T_Cryptostats = 281,
-    T_Ctl = 282,
-    T_Day = 283,
-    T_Default = 284,
-    T_Digest = 285,
-    T_Disable = 286,
-    T_Discard = 287,
-    T_Dispersion = 288,
-    T_Double = 289,
-    T_Driftfile = 290,
-    T_Drop = 291,
-    T_Dscp = 292,
-    T_Ellipsis = 293,
-    T_Enable = 294,
-    T_End = 295,
-    T_Epeer = 296,
-    T_False = 297,
-    T_File = 298,
-    T_Filegen = 299,
-    T_Filenum = 300,
-    T_Flag1 = 301,
-    T_Flag2 = 302,
-    T_Flag3 = 303,
-    T_Flag4 = 304,
-    T_Flake = 305,
-    T_Floor = 306,
-    T_Freq = 307,
-    T_Fudge = 308,
-    T_Host = 309,
-    T_Huffpuff = 310,
-    T_Iburst = 311,
-    T_Ident = 312,
-    T_Ignore = 313,
-    T_Incalloc = 314,
-    T_Incmem = 315,
-    T_Initalloc = 316,
-    T_Initmem = 317,
-    T_Includefile = 318,
-    T_Integer = 319,
-    T_Interface = 320,
-    T_Intrange = 321,
-    T_Io = 322,
-    T_Ippeerlimit = 323,
-    T_Ipv4 = 324,
-    T_Ipv4_flag = 325,
-    T_Ipv6 = 326,
-    T_Ipv6_flag = 327,
-    T_Kernel = 328,
-    T_Key = 329,
-    T_Keys = 330,
-    T_Keysdir = 331,
-    T_Kod = 332,
-    T_Mssntp = 333,
-    T_Leapfile = 334,
-    T_Leapsmearinterval = 335,
-    T_Limited = 336,
-    T_Link = 337,
-    T_Listen = 338,
-    T_Logconfig = 339,
-    T_Logfile = 340,
-    T_Loopstats = 341,
-    T_Lowpriotrap = 342,
-    T_Manycastclient = 343,
-    T_Manycastserver = 344,
-    T_Mask = 345,
-    T_Maxage = 346,
-    T_Maxclock = 347,
-    T_Maxdepth = 348,
-    T_Maxdist = 349,
-    T_Maxmem = 350,
-    T_Maxpoll = 351,
-    T_Mdnstries = 352,
-    T_Mem = 353,
-    T_Memlock = 354,
-    T_Minclock = 355,
-    T_Mindepth = 356,
-    T_Mindist = 357,
-    T_Minimum = 358,
-    T_Minpoll = 359,
-    T_Minsane = 360,
-    T_Mode = 361,
-    T_Mode7 = 362,
-    T_Monitor = 363,
-    T_Month = 364,
-    T_Mru = 365,
-    T_Multicastclient = 366,
-    T_Nic = 367,
-    T_Nolink = 368,
-    T_Nomodify = 369,
-    T_Nomrulist = 370,
-    T_None = 371,
-    T_Nonvolatile = 372,
-    T_Noepeer = 373,
-    T_Nopeer = 374,
-    T_Noquery = 375,
-    T_Noselect = 376,
-    T_Noserve = 377,
-    T_Notrap = 378,
-    T_Notrust = 379,
-    T_Ntp = 380,
-    T_Ntpport = 381,
-    T_NtpSignDsocket = 382,
-    T_Orphan = 383,
-    T_Orphanwait = 384,
-    T_PCEdigest = 385,
-    T_Panic = 386,
-    T_Peer = 387,
-    T_Peerstats = 388,
-    T_Phone = 389,
-    T_Pid = 390,
-    T_Pidfile = 391,
-    T_Pool = 392,
-    T_Port = 393,
-    T_Preempt = 394,
-    T_Prefer = 395,
-    T_Protostats = 396,
-    T_Pw = 397,
-    T_Randfile = 398,
-    T_Rawstats = 399,
-    T_Refid = 400,
-    T_Requestkey = 401,
-    T_Reset = 402,
-    T_Restrict = 403,
-    T_Revoke = 404,
-    T_Rlimit = 405,
-    T_Saveconfigdir = 406,
-    T_Server = 407,
-    T_Setvar = 408,
-    T_Source = 409,
-    T_Stacksize = 410,
-    T_Statistics = 411,
-    T_Stats = 412,
-    T_Statsdir = 413,
-    T_Step = 414,
-    T_Stepback = 415,
-    T_Stepfwd = 416,
-    T_Stepout = 417,
-    T_Stratum = 418,
-    T_String = 419,
-    T_Sys = 420,
-    T_Sysstats = 421,
-    T_Tick = 422,
-    T_Time1 = 423,
-    T_Time2 = 424,
-    T_Timer = 425,
-    T_Timingstats = 426,
-    T_Tinker = 427,
-    T_Tos = 428,
-    T_Trap = 429,
-    T_True = 430,
-    T_Trustedkey = 431,
-    T_Ttl = 432,
-    T_Type = 433,
-    T_U_int = 434,
-    T_UEcrypto = 435,
-    T_UEcryptonak = 436,
-    T_UEdigest = 437,
-    T_Unconfig = 438,
-    T_Unpeer = 439,
-    T_Version = 440,
-    T_WanderThreshold = 441,
-    T_Week = 442,
-    T_Wildcard = 443,
-    T_Xleave = 444,
-    T_Year = 445,
-    T_Flag = 446,
-    T_EOC = 447,
-    T_Simulate = 448,
-    T_Beep_Delay = 449,
-    T_Sim_Duration = 450,
-    T_Server_Offset = 451,
-    T_Duration = 452,
-    T_Freq_Offset = 453,
-    T_Wander = 454,
-    T_Jitter = 455,
-    T_Prop_Delay = 456,
-    T_Proc_Delay = 457
+    T_Checkhash = 277,
+    T_Clockstats = 278,
+    T_Cohort = 279,
+    T_ControlKey = 280,
+    T_Crypto = 281,
+    T_Cryptostats = 282,
+    T_Ctl = 283,
+    T_Day = 284,
+    T_Default = 285,
+    T_Digest = 286,
+    T_Disable = 287,
+    T_Discard = 288,
+    T_Dispersion = 289,
+    T_Double = 290,
+    T_Driftfile = 291,
+    T_Drop = 292,
+    T_Dscp = 293,
+    T_Ellipsis = 294,
+    T_Enable = 295,
+    T_End = 296,
+    T_Epeer = 297,
+    T_False = 298,
+    T_File = 299,
+    T_Filegen = 300,
+    T_Filenum = 301,
+    T_Flag1 = 302,
+    T_Flag2 = 303,
+    T_Flag3 = 304,
+    T_Flag4 = 305,
+    T_Flake = 306,
+    T_Floor = 307,
+    T_Freq = 308,
+    T_Fudge = 309,
+    T_Fuzz = 310,
+    T_Host = 311,
+    T_Huffpuff = 312,
+    T_Iburst = 313,
+    T_Ident = 314,
+    T_Ignore = 315,
+    T_Ignorehash = 316,
+    T_Incalloc = 317,
+    T_Incmem = 318,
+    T_Initalloc = 319,
+    T_Initmem = 320,
+    T_Includefile = 321,
+    T_Integer = 322,
+    T_Interface = 323,
+    T_Intrange = 324,
+    T_Io = 325,
+    T_Ippeerlimit = 326,
+    T_Ipv4 = 327,
+    T_Ipv4_flag = 328,
+    T_Ipv6 = 329,
+    T_Ipv6_flag = 330,
+    T_Kernel = 331,
+    T_Key = 332,
+    T_Keys = 333,
+    T_Keysdir = 334,
+    T_Kod = 335,
+    T_Leapfile = 336,
+    T_Leapsmearinterval = 337,
+    T_Limited = 338,
+    T_Link = 339,
+    T_Listen = 340,
+    T_Logconfig = 341,
+    T_Logfile = 342,
+    T_Loopstats = 343,
+    T_Lowpriotrap = 344,
+    T_Manycastclient = 345,
+    T_Manycastserver = 346,
+    T_Mask = 347,
+    T_Maxage = 348,
+    T_Maxclock = 349,
+    T_Maxdepth = 350,
+    T_Maxdist = 351,
+    T_Maxmem = 352,
+    T_Maxpoll = 353,
+    T_Mdnstries = 354,
+    T_Mem = 355,
+    T_Memlock = 356,
+    T_Minclock = 357,
+    T_Mindepth = 358,
+    T_Mindist = 359,
+    T_Minimum = 360,
+    T_Minjitter = 361,
+    T_Minpoll = 362,
+    T_Minsane = 363,
+    T_Mode = 364,
+    T_Mode7 = 365,
+    T_Monitor = 366,
+    T_Month = 367,
+    T_Mru = 368,
+    T_Mssntp = 369,
+    T_Multicastclient = 370,
+    T_Nic = 371,
+    T_Nolink = 372,
+    T_Nomodify = 373,
+    T_Nomrulist = 374,
+    T_None = 375,
+    T_Nonvolatile = 376,
+    T_Noepeer = 377,
+    T_Nopeer = 378,
+    T_Noquery = 379,
+    T_Noselect = 380,
+    T_Noserve = 381,
+    T_Notrap = 382,
+    T_Notrust = 383,
+    T_Ntp = 384,
+    T_Ntpport = 385,
+    T_NtpSignDsocket = 386,
+    T_Orphan = 387,
+    T_Orphanwait = 388,
+    T_PCEdigest = 389,
+    T_Panic = 390,
+    T_Peer = 391,
+    T_Peerstats = 392,
+    T_Phone = 393,
+    T_Pid = 394,
+    T_Pidfile = 395,
+    T_Poll = 396,
+    T_PollSkewList = 397,
+    T_Pool = 398,
+    T_Port = 399,
+    T_Preempt = 400,
+    T_Prefer = 401,
+    T_Protostats = 402,
+    T_Pw = 403,
+    T_Randfile = 404,
+    T_Rawstats = 405,
+    T_Refid = 406,
+    T_Requestkey = 407,
+    T_Reset = 408,
+    T_Restrict = 409,
+    T_Revoke = 410,
+    T_Rlimit = 411,
+    T_Saveconfigdir = 412,
+    T_Server = 413,
+    T_Serverresponse = 414,
+    T_ServerresponseFuzz = 415,
+    T_Setvar = 416,
+    T_Source = 417,
+    T_Stacksize = 418,
+    T_Statistics = 419,
+    T_Stats = 420,
+    T_Statsdir = 421,
+    T_Step = 422,
+    T_Stepback = 423,
+    T_Stepfwd = 424,
+    T_Stepout = 425,
+    T_Stratum = 426,
+    T_String = 427,
+    T_Sys = 428,
+    T_Sysstats = 429,
+    T_Tick = 430,
+    T_Time1 = 431,
+    T_Time2 = 432,
+    T_Timer = 433,
+    T_Timingstats = 434,
+    T_Tinker = 435,
+    T_Tos = 436,
+    T_Trap = 437,
+    T_True = 438,
+    T_Trustedkey = 439,
+    T_Ttl = 440,
+    T_Type = 441,
+    T_U_int = 442,
+    T_UEcrypto = 443,
+    T_UEcryptonak = 444,
+    T_UEdigest = 445,
+    T_Unconfig = 446,
+    T_Unpeer = 447,
+    T_Version = 448,
+    T_WanderThreshold = 449,
+    T_Week = 450,
+    T_Wildcard = 451,
+    T_Xleave = 452,
+    T_Xmtnonce = 453,
+    T_Year = 454,
+    T_Flag = 455,
+    T_EOC = 456,
+    T_Simulate = 457,
+    T_Beep_Delay = 458,
+    T_Sim_Duration = 459,
+    T_Server_Offset = 460,
+    T_Duration = 461,
+    T_Freq_Offset = 462,
+    T_Wander = 463,
+    T_Jitter = 464,
+    T_Prop_Delay = 465,
+    T_Proc_Delay = 466
   };
 #endif
 /* Tokens.  */
@@ -354,187 +363,196 @@
 #define T_Burst 274
 #define T_Calibrate 275
 #define T_Ceiling 276
-#define T_Clockstats 277
-#define T_Cohort 278
-#define T_ControlKey 279
-#define T_Crypto 280
-#define T_Cryptostats 281
-#define T_Ctl 282
-#define T_Day 283
-#define T_Default 284
-#define T_Digest 285
-#define T_Disable 286
-#define T_Discard 287
-#define T_Dispersion 288
-#define T_Double 289
-#define T_Driftfile 290
-#define T_Drop 291
-#define T_Dscp 292
-#define T_Ellipsis 293
-#define T_Enable 294
-#define T_End 295
-#define T_Epeer 296
-#define T_False 297
-#define T_File 298
-#define T_Filegen 299
-#define T_Filenum 300
-#define T_Flag1 301
-#define T_Flag2 302
-#define T_Flag3 303
-#define T_Flag4 304
-#define T_Flake 305
-#define T_Floor 306
-#define T_Freq 307
-#define T_Fudge 308
-#define T_Host 309
-#define T_Huffpuff 310
-#define T_Iburst 311
-#define T_Ident 312
-#define T_Ignore 313
-#define T_Incalloc 314
-#define T_Incmem 315
-#define T_Initalloc 316
-#define T_Initmem 317
-#define T_Includefile 318
-#define T_Integer 319
-#define T_Interface 320
-#define T_Intrange 321
-#define T_Io 322
-#define T_Ippeerlimit 323
-#define T_Ipv4 324
-#define T_Ipv4_flag 325
-#define T_Ipv6 326
-#define T_Ipv6_flag 327
-#define T_Kernel 328
-#define T_Key 329
-#define T_Keys 330
-#define T_Keysdir 331
-#define T_Kod 332
-#define T_Mssntp 333
-#define T_Leapfile 334
-#define T_Leapsmearinterval 335
-#define T_Limited 336
-#define T_Link 337
-#define T_Listen 338
-#define T_Logconfig 339
-#define T_Logfile 340
-#define T_Loopstats 341
-#define T_Lowpriotrap 342
-#define T_Manycastclient 343
-#define T_Manycastserver 344
-#define T_Mask 345
-#define T_Maxage 346
-#define T_Maxclock 347
-#define T_Maxdepth 348
-#define T_Maxdist 349
-#define T_Maxmem 350
-#define T_Maxpoll 351
-#define T_Mdnstries 352
-#define T_Mem 353
-#define T_Memlock 354
-#define T_Minclock 355
-#define T_Mindepth 356
-#define T_Mindist 357
-#define T_Minimum 358
-#define T_Minpoll 359
-#define T_Minsane 360
-#define T_Mode 361
-#define T_Mode7 362
-#define T_Monitor 363
-#define T_Month 364
-#define T_Mru 365
-#define T_Multicastclient 366
-#define T_Nic 367
-#define T_Nolink 368
-#define T_Nomodify 369
-#define T_Nomrulist 370
-#define T_None 371
-#define T_Nonvolatile 372
-#define T_Noepeer 373
-#define T_Nopeer 374
-#define T_Noquery 375
-#define T_Noselect 376
-#define T_Noserve 377
-#define T_Notrap 378
-#define T_Notrust 379
-#define T_Ntp 380
-#define T_Ntpport 381
-#define T_NtpSignDsocket 382
-#define T_Orphan 383
-#define T_Orphanwait 384
-#define T_PCEdigest 385
-#define T_Panic 386
-#define T_Peer 387
-#define T_Peerstats 388
-#define T_Phone 389
-#define T_Pid 390
-#define T_Pidfile 391
-#define T_Pool 392
-#define T_Port 393
-#define T_Preempt 394
-#define T_Prefer 395
-#define T_Protostats 396
-#define T_Pw 397
-#define T_Randfile 398
-#define T_Rawstats 399
-#define T_Refid 400
-#define T_Requestkey 401
-#define T_Reset 402
-#define T_Restrict 403
-#define T_Revoke 404
-#define T_Rlimit 405
-#define T_Saveconfigdir 406
-#define T_Server 407
-#define T_Setvar 408
-#define T_Source 409
-#define T_Stacksize 410
-#define T_Statistics 411
-#define T_Stats 412
-#define T_Statsdir 413
-#define T_Step 414
-#define T_Stepback 415
-#define T_Stepfwd 416
-#define T_Stepout 417
-#define T_Stratum 418
-#define T_String 419
-#define T_Sys 420
-#define T_Sysstats 421
-#define T_Tick 422
-#define T_Time1 423
-#define T_Time2 424
-#define T_Timer 425
-#define T_Timingstats 426
-#define T_Tinker 427
-#define T_Tos 428
-#define T_Trap 429
-#define T_True 430
-#define T_Trustedkey 431
-#define T_Ttl 432
-#define T_Type 433
-#define T_U_int 434
-#define T_UEcrypto 435
-#define T_UEcryptonak 436
-#define T_UEdigest 437
-#define T_Unconfig 438
-#define T_Unpeer 439
-#define T_Version 440
-#define T_WanderThreshold 441
-#define T_Week 442
-#define T_Wildcard 443
-#define T_Xleave 444
-#define T_Year 445
-#define T_Flag 446
-#define T_EOC 447
-#define T_Simulate 448
-#define T_Beep_Delay 449
-#define T_Sim_Duration 450
-#define T_Server_Offset 451
-#define T_Duration 452
-#define T_Freq_Offset 453
-#define T_Wander 454
-#define T_Jitter 455
-#define T_Prop_Delay 456
-#define T_Proc_Delay 457
+#define T_Checkhash 277
+#define T_Clockstats 278
+#define T_Cohort 279
+#define T_ControlKey 280
+#define T_Crypto 281
+#define T_Cryptostats 282
+#define T_Ctl 283
+#define T_Day 284
+#define T_Default 285
+#define T_Digest 286
+#define T_Disable 287
+#define T_Discard 288
+#define T_Dispersion 289
+#define T_Double 290
+#define T_Driftfile 291
+#define T_Drop 292
+#define T_Dscp 293
+#define T_Ellipsis 294
+#define T_Enable 295
+#define T_End 296
+#define T_Epeer 297
+#define T_False 298
+#define T_File 299
+#define T_Filegen 300
+#define T_Filenum 301
+#define T_Flag1 302
+#define T_Flag2 303
+#define T_Flag3 304
+#define T_Flag4 305
+#define T_Flake 306
+#define T_Floor 307
+#define T_Freq 308
+#define T_Fudge 309
+#define T_Fuzz 310
+#define T_Host 311
+#define T_Huffpuff 312
+#define T_Iburst 313
+#define T_Ident 314
+#define T_Ignore 315
+#define T_Ignorehash 316
+#define T_Incalloc 317
+#define T_Incmem 318
+#define T_Initalloc 319
+#define T_Initmem 320
+#define T_Includefile 321
+#define T_Integer 322
+#define T_Interface 323
+#define T_Intrange 324
+#define T_Io 325
+#define T_Ippeerlimit 326
+#define T_Ipv4 327
+#define T_Ipv4_flag 328
+#define T_Ipv6 329
+#define T_Ipv6_flag 330
+#define T_Kernel 331
+#define T_Key 332
+#define T_Keys 333
+#define T_Keysdir 334
+#define T_Kod 335
+#define T_Leapfile 336
+#define T_Leapsmearinterval 337
+#define T_Limited 338
+#define T_Link 339
+#define T_Listen 340
+#define T_Logconfig 341
+#define T_Logfile 342
+#define T_Loopstats 343
+#define T_Lowpriotrap 344
+#define T_Manycastclient 345
+#define T_Manycastserver 346
+#define T_Mask 347
+#define T_Maxage 348
+#define T_Maxclock 349
+#define T_Maxdepth 350
+#define T_Maxdist 351
+#define T_Maxmem 352
+#define T_Maxpoll 353
+#define T_Mdnstries 354
+#define T_Mem 355
+#define T_Memlock 356
+#define T_Minclock 357
+#define T_Mindepth 358
+#define T_Mindist 359
+#define T_Minimum 360
+#define T_Minjitter 361
+#define T_Minpoll 362
+#define T_Minsane 363
+#define T_Mode 364
+#define T_Mode7 365
+#define T_Monitor 366
+#define T_Month 367
+#define T_Mru 368
+#define T_Mssntp 369
+#define T_Multicastclient 370
+#define T_Nic 371
+#define T_Nolink 372
+#define T_Nomodify 373
+#define T_Nomrulist 374
+#define T_None 375
+#define T_Nonvolatile 376
+#define T_Noepeer 377
+#define T_Nopeer 378
+#define T_Noquery 379
+#define T_Noselect 380
+#define T_Noserve 381
+#define T_Notrap 382
+#define T_Notrust 383
+#define T_Ntp 384
+#define T_Ntpport 385
+#define T_NtpSignDsocket 386
+#define T_Orphan 387
+#define T_Orphanwait 388
+#define T_PCEdigest 389
+#define T_Panic 390
+#define T_Peer 391
+#define T_Peerstats 392
+#define T_Phone 393
+#define T_Pid 394
+#define T_Pidfile 395
+#define T_Poll 396
+#define T_PollSkewList 397
+#define T_Pool 398
+#define T_Port 399
+#define T_Preempt 400
+#define T_Prefer 401
+#define T_Protostats 402
+#define T_Pw 403
+#define T_Randfile 404
+#define T_Rawstats 405
+#define T_Refid 406
+#define T_Requestkey 407
+#define T_Reset 408
+#define T_Restrict 409
+#define T_Revoke 410
+#define T_Rlimit 411
+#define T_Saveconfigdir 412
+#define T_Server 413
+#define T_Serverresponse 414
+#define T_ServerresponseFuzz 415
+#define T_Setvar 416
+#define T_Source 417
+#define T_Stacksize 418
+#define T_Statistics 419
+#define T_Stats 420
+#define T_Statsdir 421
+#define T_Step 422
+#define T_Stepback 423
+#define T_Stepfwd 424
+#define T_Stepout 425
+#define T_Stratum 426
+#define T_String 427
+#define T_Sys 428
+#define T_Sysstats 429
+#define T_Tick 430
+#define T_Time1 431
+#define T_Time2 432
+#define T_Timer 433
+#define T_Timingstats 434
+#define T_Tinker 435
+#define T_Tos 436
+#define T_Trap 437
+#define T_True 438
+#define T_Trustedkey 439
+#define T_Ttl 440
+#define T_Type 441
+#define T_U_int 442
+#define T_UEcrypto 443
+#define T_UEcryptonak 444
+#define T_UEdigest 445
+#define T_Unconfig 446
+#define T_Unpeer 447
+#define T_Version 448
+#define T_WanderThreshold 449
+#define T_Week 450
+#define T_Wildcard 451
+#define T_Xleave 452
+#define T_Xmtnonce 453
+#define T_Year 454
+#define T_Flag 455
+#define T_EOC 456
+#define T_Simulate 457
+#define T_Beep_Delay 458
+#define T_Sim_Duration 459
+#define T_Server_Offset 460
+#define T_Duration 461
+#define T_Freq_Offset 462
+#define T_Wander 463
+#define T_Jitter 464
+#define T_Prop_Delay 465
+#define T_Proc_Delay 466
 
 /* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -541,7 +559,7 @@
 
 union YYSTYPE
 {
-#line 52 "ntp_parser.y" /* yacc.c:355  */
+#line 52 "../../ntpd/ntp_parser.y" /* yacc.c:355  */
 
 	char *			String;
 	double			Double;
@@ -560,7 +578,7 @@
 	script_info *		Sim_script;
 	script_info_fifo *	Sim_script_fifo;
 
-#line 564 "ntp_parser.c" /* yacc.c:355  */
+#line 582 "../../ntpd/ntp_parser.c" /* yacc.c:355  */
 };
 
 typedef union YYSTYPE YYSTYPE;
@@ -573,11 +591,11 @@
 
 int yyparse (void);
 
-#endif /* !YY_YY_NTP_PARSER_H_INCLUDED  */
+#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED  */
 
 /* Copy the second part of user declarations.  */
 
-#line 581 "ntp_parser.c" /* yacc.c:358  */
+#line 599 "../../ntpd/ntp_parser.c" /* yacc.c:358  */
 
 #ifdef short
 # undef short
@@ -817,23 +835,23 @@
 #endif /* !YYCOPY_NEEDED */
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  216
+#define YYFINAL  219
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   662
+#define YYLAST   740
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  208
+#define YYNTOKENS  218
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  107
+#define YYNNTS  111
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  324
+#define YYNRULES  336
 /* YYNSTATES -- Number of states.  */
-#define YYNSTATES  436
+#define YYNSTATES  453
 
 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
    by yylex, with out-of-bounds checking.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   457
+#define YYMAXUTOK   466
 
 #define YYTRANSLATE(YYX)                                                \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -846,15 +864,15 @@
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     204,   205,     2,     2,     2,     2,     2,     2,     2,     2,
+     214,   215,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   203,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,   213,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   206,     2,   207,     2,     2,     2,     2,
+       2,     2,     2,   216,   212,   217,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -887,7 +905,8 @@
      165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
      175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
      185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
-     195,   196,   197,   198,   199,   200,   201,   202
+     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
+     205,   206,   207,   208,   209,   210,   211
 };
 
 #if YYDEBUG
@@ -894,39 +913,40 @@
   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   378,   378,   382,   383,   384,   399,   400,   401,   402,
-     403,   404,   405,   406,   407,   408,   409,   410,   411,   412,
-     420,   430,   431,   432,   433,   434,   438,   439,   444,   449,
-     451,   457,   458,   466,   467,   468,   472,   477,   478,   479,
-     480,   481,   482,   483,   484,   488,   490,   495,   496,   497,
-     498,   499,   500,   504,   509,   518,   528,   529,   539,   541,
-     543,   545,   556,   563,   565,   570,   572,   574,   576,   578,
-     588,   594,   595,   603,   605,   617,   618,   619,   620,   621,
-     630,   635,   640,   648,   650,   652,   654,   659,   660,   661,
-     662,   663,   664,   665,   666,   667,   671,   672,   681,   683,
-     692,   702,   707,   715,   716,   717,   718,   719,   720,   721,
-     722,   727,   728,   736,   746,   755,   770,   775,   776,   780,
-     781,   785,   786,   787,   788,   789,   790,   791,   800,   804,
-     808,   816,   824,   832,   847,   862,   875,   876,   896,   897,
-     905,   906,   907,   908,   909,   910,   911,   912,   913,   914,
-     915,   916,   917,   918,   919,   920,   921,   925,   930,   938,
-     943,   944,   945,   949,   954,   962,   967,   968,   969,   970,
-     971,   972,   973,   974,   982,   992,   997,  1005,  1007,  1009,
-    1018,  1020,  1025,  1026,  1030,  1031,  1032,  1033,  1041,  1046,
-    1051,  1059,  1064,  1065,  1066,  1075,  1077,  1082,  1087,  1095,
-    1097,  1114,  1115,  1116,  1117,  1118,  1119,  1123,  1124,  1125,
-    1126,  1127,  1128,  1136,  1141,  1146,  1154,  1159,  1160,  1161,
-    1162,  1163,  1164,  1165,  1166,  1167,  1168,  1177,  1178,  1179,
-    1186,  1193,  1200,  1216,  1235,  1237,  1239,  1241,  1243,  1245,
-    1252,  1257,  1258,  1259,  1263,  1267,  1276,  1277,  1281,  1282,
-    1283,  1287,  1298,  1316,  1328,  1333,  1335,  1340,  1341,  1349,
-    1351,  1359,  1364,  1372,  1397,  1404,  1414,  1415,  1419,  1420,
-    1421,  1422,  1426,  1427,  1428,  1432,  1437,  1442,  1450,  1451,
-    1452,  1453,  1454,  1455,  1456,  1466,  1471,  1479,  1484,  1492,
-    1494,  1498,  1503,  1508,  1516,  1521,  1529,  1538,  1539,  1543,
-    1544,  1548,  1556,  1574,  1578,  1583,  1591,  1596,  1597,  1601,
-    1606,  1614,  1619,  1624,  1629,  1634,  1642,  1647,  1652,  1660,
-    1665,  1666,  1667,  1668,  1669
+       0,   391,   391,   395,   396,   397,   412,   413,   414,   415,
+     416,   417,   418,   419,   420,   421,   422,   423,   424,   425,
+     433,   443,   444,   445,   446,   447,   451,   452,   457,   462,
+     464,   470,   471,   479,   480,   481,   485,   490,   491,   492,
+     493,   494,   495,   496,   497,   498,   502,   504,   509,   510,
+     511,   512,   513,   514,   518,   523,   532,   542,   543,   553,
+     555,   557,   559,   570,   577,   579,   584,   586,   588,   590,
+     592,   602,   608,   609,   617,   619,   631,   632,   633,   634,
+     635,   644,   649,   654,   662,   664,   666,   668,   673,   674,
+     675,   676,   677,   678,   679,   680,   681,   685,   686,   695,
+     697,   706,   716,   721,   729,   730,   731,   732,   733,   734,
+     735,   736,   741,   742,   750,   760,   769,   784,   789,   790,
+     794,   795,   799,   800,   801,   802,   803,   804,   805,   814,
+     818,   822,   830,   838,   846,   861,   876,   889,   890,   910,
+     911,   919,   930,   931,   932,   933,   934,   935,   936,   937,
+     938,   939,   940,   941,   942,   943,   944,   945,   946,   950,
+     955,   963,   968,   969,   970,   974,   979,   987,   992,   993,
+     994,   995,   996,   997,   998,   999,  1007,  1017,  1022,  1030,
+    1032,  1034,  1043,  1045,  1050,  1051,  1052,  1056,  1057,  1058,
+    1059,  1067,  1072,  1077,  1085,  1090,  1091,  1092,  1101,  1103,
+    1108,  1113,  1121,  1123,  1140,  1141,  1142,  1143,  1144,  1145,
+    1149,  1150,  1151,  1152,  1153,  1154,  1162,  1167,  1172,  1180,
+    1185,  1186,  1187,  1188,  1189,  1190,  1191,  1192,  1193,  1194,
+    1203,  1204,  1205,  1212,  1219,  1226,  1242,  1261,  1269,  1271,
+    1273,  1275,  1277,  1279,  1281,  1288,  1293,  1294,  1295,  1299,
+    1303,  1312,  1314,  1317,  1321,  1325,  1326,  1327,  1331,  1342,
+    1360,  1373,  1374,  1379,  1405,  1406,  1411,  1416,  1418,  1423,
+    1424,  1432,  1434,  1442,  1447,  1455,  1480,  1487,  1497,  1498,
+    1502,  1503,  1504,  1505,  1509,  1510,  1511,  1515,  1520,  1525,
+    1533,  1534,  1535,  1536,  1537,  1538,  1539,  1549,  1554,  1562,
+    1567,  1575,  1577,  1581,  1586,  1591,  1599,  1604,  1612,  1621,
+    1622,  1626,  1627,  1631,  1639,  1657,  1661,  1666,  1674,  1679,
+    1680,  1684,  1689,  1697,  1702,  1707,  1712,  1717,  1725,  1730,
+    1735,  1743,  1748,  1749,  1750,  1751,  1752
 };
 #endif
 
@@ -939,55 +959,57 @@
   "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
   "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
   "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
-  "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
-  "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
-  "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
-  "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
-  "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
-  "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host",
-  "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc",
-  "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer",
-  "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4",
-  "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys",
-  "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval",
-  "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
-  "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
-  "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
-  "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
-  "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll",
-  "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
-  "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
-  "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery",
-  "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
+  "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort", "T_ControlKey",
+  "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest",
+  "T_Disable", "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile",
+  "T_Drop", "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer",
+  "T_False", "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2",
+  "T_Flag3", "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge",
+  "T_Fuzz", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore",
+  "T_Ignorehash", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem",
+  "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io",
+  "T_Ippeerlimit", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
+  "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Leapfile",
+  "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
+  "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
+  "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
+  "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
+  "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
+  "T_Minjitter", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
+  "T_Monitor", "T_Month", "T_Mru", "T_Mssntp", "T_Multicastclient",
+  "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None",
+  "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery", "T_Noselect",
+  "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
   "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
-  "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
-  "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
-  "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
-  "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
-  "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
-  "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
-  "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
-  "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
-  "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
-  "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
-  "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
-  "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
-  "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
-  "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
-  "$accept", "configuration", "command_list", "command", "server_command",
-  "client_type", "address", "ip_address", "address_fam", "option_list",
-  "option", "option_flag", "option_flag_keyword", "option_int",
-  "option_int_keyword", "option_str", "option_str_keyword",
-  "unpeer_command", "unpeer_keyword", "other_mode_command",
-  "authentication_command", "crypto_command_list", "crypto_command",
-  "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
-  "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
-  "monitoring_command", "stats_list", "stat", "filegen_option_list",
-  "filegen_option", "link_nolink", "enable_disable", "filegen_type",
-  "access_control_command", "res_ippeerlimit", "ac_flag_list",
-  "access_control_flag", "discard_option_list", "discard_option",
-  "discard_option_keyword", "mru_option_list", "mru_option",
-  "mru_option_keyword", "fudge_command", "fudge_factor_list",
+  "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Poll",
+  "T_PollSkewList", "T_Pool", "T_Port", "T_Preempt", "T_Prefer",
+  "T_Protostats", "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid",
+  "T_Requestkey", "T_Reset", "T_Restrict", "T_Revoke", "T_Rlimit",
+  "T_Saveconfigdir", "T_Server", "T_Serverresponse",
+  "T_ServerresponseFuzz", "T_Setvar", "T_Source", "T_Stacksize",
+  "T_Statistics", "T_Stats", "T_Statsdir", "T_Step", "T_Stepback",
+  "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys", "T_Sysstats",
+  "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats", "T_Tinker",
+  "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl", "T_Type",
+  "T_U_int", "T_UEcrypto", "T_UEcryptonak", "T_UEdigest", "T_Unconfig",
+  "T_Unpeer", "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard",
+  "T_Xleave", "T_Xmtnonce", "T_Year", "T_Flag", "T_EOC", "T_Simulate",
+  "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset", "T_Duration",
+  "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay",
+  "'|'", "'='", "'('", "')'", "'{'", "'}'", "$accept", "configuration",
+  "command_list", "command", "server_command", "client_type", "address",
+  "ip_address", "address_fam", "option_list", "option", "option_flag",
+  "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
+  "option_str_keyword", "unpeer_command", "unpeer_keyword",
+  "other_mode_command", "authentication_command", "crypto_command_list",
+  "crypto_command", "crypto_str_keyword", "orphan_mode_command",
+  "tos_option_list", "tos_option", "tos_option_int_keyword",
+  "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
+  "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
+  "filegen_type", "access_control_command", "res_ippeerlimit",
+  "ac_flag_list", "access_control_flag", "discard_option_list",
+  "discard_option", "discard_option_keyword", "mru_option_list",
+  "mru_option", "mru_option_keyword", "fudge_command", "fudge_factor_list",
   "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
   "rlimit_command", "rlimit_option_list", "rlimit_option",
   "rlimit_option_keyword", "system_option_command", "system_option_list",
@@ -995,7 +1017,8 @@
   "system_option_local_flag_keyword", "tinker_command",
   "tinker_option_list", "tinker_option", "tinker_option_keyword",
   "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
-  "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
+  "opt_hash_check", "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword",
+  "drift_parm", "pollskew_list", "pollskew_spec", "pollskew_cycle",
   "variable_assign", "t_default_or_zero", "trap_option_list",
   "trap_option", "log_config_list", "log_config_command",
   "interface_command", "interface_nic", "nic_rule_class",
@@ -1035,14 +1058,15 @@
      425,   426,   427,   428,   429,   430,   431,   432,   433,   434,
      435,   436,   437,   438,   439,   440,   441,   442,   443,   444,
      445,   446,   447,   448,   449,   450,   451,   452,   453,   454,
-     455,   456,   457,    61,    40,    41,   123,   125
+     455,   456,   457,   458,   459,   460,   461,   462,   463,   464,
+     465,   466,   124,    61,    40,    41,   123,   125
 };
 # endif
 
-#define YYPACT_NINF -215
+#define YYPACT_NINF -261
 
 #define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-215)))
+  (!!((Yystate) == (-261)))
 
 #define YYTABLE_NINF -7
 
@@ -1053,50 +1077,52 @@
      STATE-NUM.  */
 static const yytype_int16 yypact[] =
 {
-      11,  -175,     2,  -215,  -215,  -215,     3,  -215,    93,     9,
-    -138,  -215,    93,  -215,    66,   -40,  -215,   -93,  -215,   -87,
-     -82,  -215,  -215,   -81,  -215,  -215,   -40,    20,   210,   -40,
-    -215,  -215,   -70,  -215,   -67,  -215,  -215,    34,     6,   -13,
-      47,    -6,  -215,  -215,   -48,    66,   -45,  -215,   412,   483,
-     -39,   -60,    62,  -215,  -215,  -215,   127,   203,   -63,  -215,
-     -40,  -215,   -40,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,   -11,    75,   -24,   -22,  -215,   -18,  -215,
-    -215,   -53,  -215,  -215,  -215,    48,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,    93,  -215,
-    -215,  -215,  -215,  -215,  -215,     9,  -215,    82,   120,  -215,
-      93,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,    86,  -215,     4,   373,  -215,  -215,  -215,
-     -81,  -215,  -215,   -40,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,   210,  -215,   106,   -40,  -215,  -215,    15,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,     6,  -215,
-     105,   146,   151,   105,   -30,  -215,  -215,  -215,  -215,    -6,
-    -215,   117,   -21,  -215,    66,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,   412,  -215,   -11,
-      22,  -215,  -215,  -215,   -20,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,   483,  -215,   128,   -11,  -215,  -215,  -215,
-     129,   -60,  -215,  -215,  -215,   132,  -215,    10,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-       1,  -133,  -215,  -215,  -215,  -215,  -215,   134,  -215,    41,
-    -215,  -215,  -215,  -215,   -28,    42,  -215,  -215,  -215,  -215,
-      45,   148,  -215,  -215,    86,  -215,   -11,   -20,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,   150,  -215,   105,   105,
-    -215,   -39,  -215,  -215,  -215,    51,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,   -57,   178,  -215,
-    -215,  -215,   288,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -115,    25,    23,  -215,  -215,  -215,  -215,    61,  -215,
-    -215,    21,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,   477,  -215,  -215,   477,   105,   477,   201,   -39,
-     169,  -215,   172,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,   -59,  -215,    77,    36,    52,  -100,  -215,    39,
-    -215,   -11,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,   477,
-     477,  -215,  -215,  -215,  -215,  -215,    43,  -215,  -215,  -215,
-     -40,  -215,  -215,  -215,    55,  -215,   477,  -215,  -215,    49,
-      56,   -11,    54,  -166,  -215,    67,   -11,  -215,  -215,  -215,
-      70,    63,  -215,  -215,  -215,  -215,  -215,   124,    85,    64,
-    -215,    89,  -215,   -11,  -215,  -215
+      19,  -163,   -36,  -261,  -261,  -261,   -25,  -261,   326,    77,
+    -125,  -261,   326,  -261,    16,   -45,  -261,  -119,  -261,  -103,
+    -100,   -98,  -261,   -95,  -261,  -261,   -45,    13,   238,   -45,
+    -261,  -261,   -88,  -261,   -86,  -261,  -261,  -261,    22,   109,
+      -8,    23,   -38,  -261,  -261,   -81,    16,   -80,  -261,   443,
+     607,   -73,   -58,    35,  -261,  -261,  -261,   103,   229,   -90,
+    -261,   -45,  -261,   -45,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,    -9,    45,   -53,   -51,  -261,   -19,
+    -261,  -261,  -102,  -261,  -261,  -261,    82,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,   326,
+    -261,  -261,  -261,  -261,  -261,  -261,    77,  -261,    55,    91,
+    -261,   326,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,    46,  -261,   -42,   407,  -261,  -261,
+     -11,  -261,   -95,  -261,  -261,   -45,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,   238,  -261,    64,   -45,  -261,
+    -261,   -28,   -13,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,   109,  -261,    74,   118,   119,    74,   -31,  -261,  -261,
+    -261,  -261,   -38,  -261,    93,   -55,  -261,    16,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+     443,  -261,    -9,    -7,  -261,  -261,  -261,   -40,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,   607,  -261,   100,    -9,
+    -261,  -261,  -261,   101,   -58,  -261,  -261,  -261,   102,  -261,
+     -23,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,     9,  -170,  -261,  -261,  -261,  -261,  -261,
+     122,  -261,    -2,  -261,  -261,  -261,  -261,   107,    14,  -261,
+    -261,  -261,  -261,  -261,    20,   126,  -261,  -261,    46,  -261,
+      -9,   -40,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,   129,  -261,   139,  -261,    74,
+      74,  -261,   -73,  -261,  -261,  -261,    36,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,   -62,   168,
+    -261,  -261,  -261,   410,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,   -96,    17,     6,  -261,  -261,  -261,  -261,    61,
+    -261,  -261,     3,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,    24,  -261,   534,  -261,  -261,   534,    74,   534,
+     204,   -73,   173,  -261,   174,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,   -63,  -261,    70,    31,    47,
+    -146,  -261,    33,  -261,    -9,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,   183,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,   196,  -261,  -261,   534,   534,  -261,  -261,  -261,  -261,
+    -261,    37,  -261,  -261,  -261,   -45,  -261,  -261,  -261,    48,
+    -261,  -261,  -261,   534,  -261,  -261,    43,    51,    -9,    50,
+    -193,  -261,    57,    -9,  -261,  -261,  -261,    52,     5,  -261,
+    -261,  -261,  -261,  -261,    18,    58,    53,  -261,    63,  -261,
+      -9,  -261,  -261
 };
 
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1104,82 +1130,86 @@
      means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
-       0,     0,     0,    24,    58,   241,     0,    71,     0,     0,
-     253,   244,     0,   234,     0,     0,   246,     0,   266,     0,
-       0,   247,   245,     0,   248,    25,     0,     0,     0,     0,
-     267,   242,     0,    23,     0,   249,    22,     0,     0,     0,
-       0,     0,   250,    21,     0,     0,     0,   243,     0,     0,
-       0,     0,     0,    56,    57,   303,     0,     2,     0,     7,
-       0,     8,     0,     9,    10,    13,    11,    12,    14,    15,
-      16,    17,    18,     0,     0,     0,     0,   227,     0,   228,
-      19,     0,     5,    62,    63,    64,   201,   202,   203,   204,
-     207,   205,   206,   208,   209,   210,   211,   212,   196,   198,
-     199,   200,   160,   161,   162,   128,   158,     0,   251,   235,
-     195,   103,   104,   105,   106,   110,   107,   108,   109,   111,
-      29,    30,    28,     0,    26,     0,     6,    65,    66,   263,
-     236,   262,   295,    59,    61,   166,   167,   168,   169,   170,
-     171,   172,   173,   129,   164,     0,    60,    70,   293,   237,
-      67,   278,   279,   280,   281,   282,   283,   284,   275,   277,
-     136,    29,    30,   136,   136,    68,   194,   192,   193,   188,
-     190,     0,     0,   238,    98,   102,    99,   217,   218,   219,
-     220,   221,   222,   223,   224,   225,   226,   213,   215,     0,
-       0,    87,    88,    89,     0,    90,    91,    97,    92,    96,
-      93,    94,    95,    80,    82,     0,     0,    86,   257,   289,
-       0,    69,   288,   290,   286,   240,     1,     0,     4,    31,
-      55,   300,   299,   229,   230,   231,   232,   274,   273,   272,
-       0,     0,    79,    75,    76,    77,    78,     0,    72,     0,
-     197,   157,   159,   252,   100,     0,   184,   185,   186,   187,
-       0,     0,   182,   183,   174,   176,     0,     0,    27,   233,
-     261,   294,   163,   165,   292,   276,     0,   138,   136,   136,
-     138,     0,   138,   189,   191,     0,   101,   214,   216,   301,
-     298,   296,   297,    85,    81,    83,    84,   239,     0,   287,
-     285,     3,    20,   268,   269,   270,   265,   271,   264,   307,
-     308,     0,     0,     0,    74,    73,   120,   119,     0,   117,
-     118,     0,   112,   115,   116,   180,   181,   179,   175,   177,
-     178,   137,   132,   138,   138,   135,   136,   130,   256,     0,
-       0,   258,     0,    37,    38,    39,    54,    47,    49,    48,
-      51,    40,    41,    42,    43,    50,    52,    44,    32,    33,
-      36,    34,     0,    35,     0,     0,     0,     0,   310,     0,
-     305,     0,   113,   127,   123,   125,   121,   122,   124,   126,
-     114,   140,   141,   142,   143,   144,   145,   146,   148,   149,
-     147,   150,   151,   152,   153,   154,   155,   156,   139,   133,
-     134,   138,   255,   254,   260,   259,     0,    45,    46,    53,
-       0,   304,   302,   309,     0,   306,   131,   291,   313,     0,
-       0,     0,     0,     0,   315,     0,     0,   311,   314,   312,
-       0,     0,   320,   321,   322,   323,   324,     0,     0,     0,
-     316,     0,   318,     0,   317,   319
+       0,     0,     0,    24,    59,   246,     0,    72,     0,     0,
+     260,   249,     0,   238,     0,     0,   254,     0,   278,     0,
+       0,     0,   250,     0,   255,    25,     0,     0,     0,     0,
+     279,   247,     0,    23,     0,   256,   261,    22,     0,     0,
+       0,     0,     0,   257,    21,     0,     0,     0,   248,     0,
+       0,     0,     0,     0,    57,    58,   315,     0,     2,     0,
+       7,     0,     8,     0,     9,    10,    13,    11,    12,    14,
+      15,    16,    17,    18,     0,     0,     0,     0,   230,     0,
+     231,    19,     0,     5,    63,    64,    65,   204,   205,   206,
+     207,   210,   208,   209,   211,   212,   213,   214,   215,   199,
+     201,   202,   203,   162,   163,   164,   129,   160,     0,   258,
+     239,   198,   104,   105,   106,   107,   111,   108,   109,   110,
+     112,    29,    30,    28,     0,    26,     0,     6,    66,    67,
+     253,   275,   240,   274,   307,    60,    62,   168,   169,   170,
+     171,   172,   173,   174,   175,   130,   166,     0,    61,    71,
+     305,   241,   242,    68,   290,   291,   292,   293,   294,   295,
+     296,   287,   289,   137,    29,    30,   137,   137,    69,   197,
+     195,   196,   191,   193,     0,     0,   243,    99,   103,   100,
+     220,   221,   222,   223,   224,   225,   226,   227,   228,   229,
+     216,   218,     0,     0,    88,    89,    90,     0,    91,    92,
+      98,    93,    97,    94,    95,    96,    81,    83,     0,     0,
+      87,   269,   301,     0,    70,   300,   302,   298,   245,     1,
+       0,     4,    31,    56,   312,   311,   232,   233,   234,   235,
+     286,   285,   284,     0,     0,    80,    76,    77,    78,    79,
+       0,    73,     0,   200,   159,   161,   259,   101,     0,   187,
+     188,   189,   190,   186,     0,     0,   184,   185,   176,   178,
+       0,     0,    27,   236,   252,   251,   237,   273,   306,   165,
+     167,   304,   265,   264,   262,     0,   288,     0,   139,   137,
+     137,   139,     0,   139,   192,   194,     0,   102,   217,   219,
+     313,   310,   308,   309,    86,    82,    84,    85,   244,     0,
+     299,   297,     3,    20,   280,   281,   282,   277,   283,   276,
+     319,   320,     0,     0,     0,    75,    74,   121,   120,     0,
+     118,   119,     0,   113,   116,   117,   182,   183,   181,   177,
+     179,   180,     0,   138,   133,   139,   139,   136,   137,   131,
+     268,     0,     0,   270,     0,    37,    38,    39,    55,    48,
+      50,    49,    52,    40,    41,    42,    43,    51,    53,    44,
+      45,    32,    33,    36,    34,     0,    35,     0,     0,     0,
+       0,   322,     0,   317,     0,   114,   128,   124,   126,   122,
+     123,   125,   127,   115,     0,   142,   143,   144,   145,   146,
+     147,   148,   150,   151,   149,   152,   153,   154,   155,   156,
+     157,     0,   158,   140,   134,   135,   139,   267,   266,   272,
+     271,     0,    46,    47,    54,     0,   316,   314,   321,     0,
+     318,   263,   141,   132,   303,   325,     0,     0,     0,     0,
+       0,   327,     0,     0,   323,   326,   324,     0,     0,   332,
+     333,   334,   335,   336,     0,     0,     0,   328,     0,   330,
+       0,   329,   331
 };
 
   /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -215,  -215,  -215,   -23,  -215,  -215,   -15,   -49,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,    81,  -215,  -215,  -215,
-    -215,   -38,  -215,  -215,  -215,  -215,  -215,  -215,  -154,  -214,
-    -215,  -215,   153,  -215,  -215,   142,  -215,  -215,  -215,    32,
-    -215,  -215,  -215,  -215,   121,  -215,  -215,   277,   -35,  -215,
-    -215,  -215,  -215,   107,  -215,  -215,  -215,  -215,  -215,  -215,
-    -215,  -215,  -215,  -215,  -215,  -215,   163,  -215,  -215,  -215,
-    -215,  -215,  -215,   137,  -215,  -215,    87,  -215,  -215,   267,
-      53,  -187,  -215,  -215,  -215,  -215,    -2,  -215,  -215,   -55,
-    -215,  -215,  -215,  -109,  -215,  -121,  -215
+    -261,  -261,  -261,   -48,  -261,  -261,   -15,   -50,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,    65,  -261,  -261,  -261,
+    -261,   -41,  -261,  -261,  -261,  -261,  -261,  -261,  -151,  -260,
+    -261,  -261,   166,  -261,  -261,   128,  -261,  -261,  -261,    21,
+    -261,  -261,  -261,  -261,   104,  -261,  -261,   263,   -43,  -261,
+    -261,  -261,  -261,    87,  -261,  -261,  -261,  -261,  -261,  -261,
+    -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,  -261,
+     146,  -261,  -261,  -261,  -261,  -261,  -261,   120,  -261,  -261,
+      66,  -261,  -261,   255,    25,  -190,  -261,  -261,  -261,  -261,
+     -27,  -261,  -261,   -78,  -261,  -261,  -261,  -141,  -261,  -154,
+    -261
 };
 
   /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    56,    57,    58,    59,    60,   132,   124,   125,   292,
-     348,   349,   350,   351,   352,   353,   354,    61,    62,    63,
-      64,    85,   238,   239,    65,   203,   204,   205,   206,    66,
-     174,   119,   244,   312,   313,   314,   370,    67,   267,   322,
-     388,   105,   106,   107,   143,   144,   145,    68,   254,   255,
-     256,   257,    69,   169,   170,   171,    70,    98,    99,   100,
-     101,    71,   187,   188,   189,    72,    73,    74,    75,    76,
-     109,   173,   393,   287,   331,   130,   131,    77,    78,   298,
-     230,    79,   158,   159,   215,   211,   212,   213,   149,   133,
-     283,   223,   207,    80,    81,   301,   302,   303,   357,   358,
-     410,   359,   413,   414,   427,   428,   429
+      -1,    57,    58,    59,    60,    61,   134,   125,   126,   303,
+     361,   362,   363,   364,   365,   366,   367,    62,    63,    64,
+      65,    86,   241,   242,    66,   206,   207,   208,   209,    67,
+     177,   120,   247,   323,   324,   325,   383,    68,   278,   334,
+     403,   106,   107,   108,   145,   146,   147,    69,   258,   259,
+     260,   261,    70,   172,   173,   174,    71,    99,   100,   101,
+     102,    72,   190,   191,   192,    73,    74,    75,   266,    76,
+      77,   110,   152,   274,   275,   176,   408,   298,   343,   132,
+     133,    78,    79,   309,   233,    80,   161,   162,   218,   214,
+     215,   216,   151,   135,   294,   226,   210,    81,    82,   312,
+     313,   314,   370,   371,   427,   372,   430,   431,   444,   445,
+     446
 };
 
   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
@@ -1187,144 +1217,160 @@
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int16 yytable[] =
 {
-     123,   208,   278,   306,   209,   397,   293,   175,   329,   270,
-     272,   307,     1,   151,   152,   308,   160,    82,   227,   286,
-     102,     2,   280,   221,   164,   363,   108,     3,     4,     5,
-     120,   412,   121,   153,   217,     6,     7,   355,   266,   166,
-     228,   417,     8,     9,   281,   219,    10,   220,    11,   364,
-      12,    13,   355,   222,   309,    14,   325,   161,   327,   162,
-     271,   299,   300,   240,    15,   229,    83,    84,    16,   319,
-     294,   126,   295,   154,    17,   240,    18,   127,   232,   299,
-     300,   330,   128,   129,   134,   310,    19,    20,   111,   245,
-      21,    22,   112,   167,   147,    23,    24,   148,   150,    25,
-      26,    86,   233,   259,   155,   234,    87,   402,    27,   389,
-     390,   165,   103,    88,   323,   324,   172,   104,   261,   176,
-     398,    28,    29,    30,   122,   122,   214,   216,    31,   218,
-     365,   261,   246,   247,   248,   249,   276,   366,    32,   224,
-     225,   163,   226,    33,   210,    34,   242,    35,    36,   168,
-     311,   122,   113,   231,   243,   282,   367,    37,    38,    39,
-      40,    41,    42,    43,    44,   296,    89,    45,   258,    46,
-     263,   156,   391,   266,   405,   268,   157,   406,    47,   264,
-     269,   274,   275,    48,    49,    50,   279,    51,    52,   297,
-     235,   236,   285,   288,    53,    54,   290,   237,   304,   114,
-      90,    91,   291,    -6,    55,   305,   315,   115,   368,   316,
-     116,   369,   317,     2,   321,   328,   332,   360,    92,     3,
-       4,     5,   326,    93,   415,   362,   361,     6,     7,   420,
-     392,   250,   117,   395,     8,     9,   396,   118,    10,   400,
-      11,   399,    12,    13,   401,   404,   435,    14,   407,   251,
-      94,   409,   411,   412,   252,   253,    15,   416,   241,   419,
-      16,   422,   423,   424,   425,   426,    17,   433,    18,   135,
-     136,   137,   138,    95,    96,    97,   421,   432,    19,    20,
-     394,   434,    21,    22,   284,   262,   318,    23,    24,   110,
-     273,    25,    26,   260,   277,   265,   146,   333,   289,   356,
-      27,   139,   403,   140,   418,   141,   431,   334,     0,     0,
-     320,   142,     0,    28,    29,    30,     0,     0,     0,     0,
-      31,     0,   422,   423,   424,   425,   426,     0,     0,     0,
-      32,   430,     0,     0,     0,    33,     0,    34,     0,    35,
-      36,     0,     0,     0,   335,   336,     0,     0,     0,    37,
-      38,    39,    40,    41,    42,    43,    44,     0,     0,    45,
-       0,    46,   337,     0,     0,     0,     0,     0,     0,     0,
-      47,     0,     0,     0,     0,    48,    49,    50,     0,    51,
-      52,     0,     0,     2,   338,   408,    53,    54,     0,     3,
-       4,     5,   339,     0,   340,    -6,    55,     6,     7,     0,
-       0,     0,     0,     0,     8,     9,     0,     0,    10,   341,
-      11,     0,    12,    13,     0,     0,     0,    14,   177,     0,
-       0,     0,     0,     0,     0,     0,    15,   342,   343,     0,
-      16,     0,     0,     0,     0,     0,    17,     0,    18,     0,
-       0,     0,     0,     0,     0,   178,     0,     0,    19,    20,
-       0,     0,    21,    22,     0,     0,     0,    23,    24,     0,
-       0,    25,    26,   344,   179,   345,     0,   180,     0,     0,
-      27,     0,     0,   346,     0,     0,     0,   347,     0,     0,
-       0,     0,     0,    28,    29,    30,     0,     0,     0,     0,
-      31,     0,     0,     0,     0,   190,     0,   191,   192,     0,
-      32,     0,     0,     0,   193,    33,   194,    34,     0,    35,
-      36,     0,     0,     0,     0,     0,     0,     0,   371,    37,
-      38,    39,    40,    41,    42,    43,    44,   372,     0,    45,
-       0,    46,     0,     0,   195,   373,     0,     0,     0,     0,
-      47,     0,     0,   181,     0,    48,    49,    50,     0,    51,
-      52,     0,     0,     0,   374,   375,    53,    54,   376,     0,
-       0,     0,     0,     0,   377,     0,    55,     0,     0,     0,
-       0,   182,   183,   184,   185,   196,     0,   197,     0,   186,
-       0,     0,     0,   198,     0,   199,     0,     0,   200,     0,
-       0,   378,   379,     0,     0,   380,   381,   382,     0,   383,
-     384,   385,     0,   386,     0,     0,     0,     0,     0,     0,
-       0,   201,   202,     0,     0,     0,     0,     0,     0,     0,
+     124,   211,   289,   291,   412,   178,   341,   376,   169,   212,
+     220,   264,   368,   429,   304,   281,   283,   272,   230,   297,
+       1,   337,   163,   339,   434,   167,   224,   292,   121,     2,
+     122,    84,   377,   310,   311,     3,     4,     5,    83,   112,
+     277,   231,    85,   113,     6,     7,   222,   109,   223,   248,
+     265,     8,     9,   127,   273,    10,   243,    11,   225,    12,
+      13,   282,   368,   170,    14,   164,   232,   165,   243,   128,
+     330,   417,   129,    15,   130,   404,   405,   131,    16,   263,
+     136,   305,   342,   306,   149,    17,   150,    18,   103,   153,
+     168,   175,   179,   249,   250,   251,   252,    19,    20,   123,
+      21,    22,   217,   219,   114,    23,    24,   310,   311,    25,
+      26,   221,   227,   235,   234,   378,   154,   155,    27,   228,
+     268,   229,   245,   379,   413,   171,   246,   123,   335,   336,
+     262,   270,    28,   268,    29,    30,   287,   156,   236,   317,
+      31,   237,   380,   293,   271,   277,   423,   318,   279,   280,
+      32,   319,   253,   115,   166,    33,   213,    34,   286,    35,
+     285,    36,    37,   116,   123,   290,   117,   296,   299,   301,
+     316,    38,    39,    40,    41,    42,    43,    44,   302,   157,
+      45,   307,   104,    46,   420,    47,   326,   406,   105,   315,
+     118,   320,   327,   328,    48,   119,   332,   254,   381,    49,
+      50,    51,   382,    52,    53,   308,   333,   344,   340,   158,
+      54,    55,   439,   440,   441,   442,   443,   255,   373,   374,
+      -6,    56,   256,   257,   321,   439,   440,   441,   442,   443,
+     238,   239,   338,   375,   407,   447,   384,   240,   432,     2,
+     410,   411,   414,   437,   415,     3,     4,     5,   416,   419,
+     421,   422,   424,   426,     6,     7,   428,   429,   436,   449,
+     452,     8,     9,   433,   451,    10,   450,    11,   438,    12,
+      13,   295,   244,   269,    14,   111,   284,   288,   267,   329,
+     300,   276,   159,    15,   148,   369,   331,   160,    16,   435,
+     448,   409,   418,   322,     0,    17,     0,    18,     0,     0,
+     137,   138,   139,   140,     0,     0,     0,    19,    20,     0,
+      21,    22,     0,     0,     0,    23,    24,     0,     0,    25,
+      26,     0,     0,     0,     0,     0,     0,     0,    27,     0,
+       0,   141,     0,   142,    87,   143,     0,     0,     0,    88,
+       0,   144,    28,     0,    29,    30,    89,     0,     0,     0,
+      31,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      32,     0,     0,     0,     0,    33,     0,    34,     0,    35,
+       0,    36,    37,     0,     0,     0,     0,     0,     0,     0,
+       0,    38,    39,    40,    41,    42,    43,    44,     0,     0,
+      45,     0,     0,    46,     0,    47,     0,     0,     0,     0,
+     425,     0,    90,     0,    48,     0,     0,     0,     0,    49,
+      50,    51,     0,    52,    53,     0,     0,     2,     0,   345,
+      54,    55,     0,     3,     4,     5,     0,     0,     0,   346,
+      -6,    56,     6,     7,     0,     0,    91,    92,     0,     8,
+       9,     0,     0,    10,     0,    11,     0,    12,    13,   180,
+       0,     0,    14,     0,     0,    93,     0,     0,     0,     0,
+      94,    15,     0,     0,     0,     0,    16,     0,   347,   348,
+       0,     0,     0,    17,     0,    18,     0,   181,     0,     0,
+       0,     0,     0,     0,     0,    19,    20,   349,    21,    22,
+       0,    95,     0,    23,    24,     0,   182,    25,    26,     0,
+     183,     0,     0,     0,     0,     0,    27,     0,   350,     0,
+       0,     0,     0,     0,    96,    97,    98,   351,     0,   352,
+      28,     0,    29,    30,     0,     0,     0,     0,    31,     0,
+       0,     0,     0,     0,     0,   353,     0,     0,    32,     0,
+       0,     0,     0,    33,     0,    34,     0,    35,     0,    36,
+      37,     0,     0,     0,     0,   354,   355,     0,     0,    38,
+      39,    40,    41,    42,    43,    44,     0,     0,    45,     0,
+       0,    46,     0,    47,     0,     0,   385,     0,   184,     0,
+       0,     0,    48,     0,     0,   386,     0,    49,    50,    51,
+       0,    52,    53,   356,   387,   357,     0,     0,    54,    55,
+       0,     0,     0,   358,     0,     0,     0,   359,   360,    56,
+     185,   186,   187,   188,   388,     0,     0,   389,   189,   193,
+       0,   194,   195,   390,     0,     0,     0,     0,   196,     0,
+       0,   197,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   391,     0,
+       0,     0,   392,   393,     0,     0,   394,   395,   396,   198,
+     397,   398,   399,     0,   400,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   387
+       0,     0,     0,   401,     0,     0,     0,     0,     0,     0,
+       0,   199,     0,   200,     0,     0,     0,     0,     0,   201,
+       0,   202,     0,     0,     0,   203,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   402,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   204,
+     205
 };
 
 static const yytype_int16 yycheck[] =
 {
-      15,    50,   189,    31,    64,    64,     5,    45,    65,   163,
-     164,    39,     1,     7,     8,    43,    29,   192,    36,   206,
-      11,    10,    42,    34,    39,     4,   164,    16,    17,    18,
-      70,   197,    72,    27,    57,    24,    25,   152,    68,    45,
-      58,   207,    31,    32,    64,    60,    35,    62,    37,    28,
-      39,    40,   152,    64,    82,    44,   270,    70,   272,    72,
-      90,   194,   195,    98,    53,    83,    64,    64,    57,   256,
-      69,   164,    71,    67,    63,   110,    65,   164,    30,   194,
-     195,   138,   164,   164,    64,   113,    75,    76,    22,     3,
-      79,    80,    26,    99,   164,    84,    85,   164,    64,    88,
-      89,     8,    54,   126,    98,    57,    13,   207,    97,   323,
-     324,    64,   103,    20,   268,   269,   164,   108,   133,   164,
-     179,   110,   111,   112,   164,   164,    64,     0,   117,   192,
-     109,   146,    46,    47,    48,    49,   174,   116,   127,    64,
-     164,   154,   164,   132,   204,   134,    64,   136,   137,   155,
-     178,   164,    86,   206,    34,   175,   135,   146,   147,   148,
-     149,   150,   151,   152,   153,   164,    73,   156,   164,   158,
-      64,   165,   326,    68,   361,    29,   170,   391,   167,   164,
-      29,    64,   203,   172,   173,   174,   164,   176,   177,   188,
-     142,   143,    64,    64,   183,   184,    64,   149,    64,   133,
-     107,   108,   192,   192,   193,   164,   164,   141,   187,   164,
-     144,   190,    64,    10,    64,   164,    38,   192,   125,    16,
-      17,    18,   271,   130,   411,   164,   203,    24,    25,   416,
-      29,   145,   166,    64,    31,    32,    64,   171,    35,   203,
-      37,   164,    39,    40,   192,   206,   433,    44,   205,   163,
-     157,   196,   203,   197,   168,   169,    53,   203,   105,   192,
-      57,   198,   199,   200,   201,   202,    63,   203,    65,    59,
-      60,    61,    62,   180,   181,   182,   206,   192,    75,    76,
-     329,   192,    79,    80,   203,   143,   254,    84,    85,    12,
-     169,    88,    89,   130,   187,   158,    29,     9,   211,   301,
-      97,    91,   357,    93,   413,    95,   427,    19,    -1,    -1,
-     257,   101,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,
-     117,    -1,   198,   199,   200,   201,   202,    -1,    -1,    -1,
-     127,   207,    -1,    -1,    -1,   132,    -1,   134,    -1,   136,
-     137,    -1,    -1,    -1,    56,    57,    -1,    -1,    -1,   146,
-     147,   148,   149,   150,   151,   152,   153,    -1,    -1,   156,
-      -1,   158,    74,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     167,    -1,    -1,    -1,    -1,   172,   173,   174,    -1,   176,
-     177,    -1,    -1,    10,    96,   400,   183,   184,    -1,    16,
-      17,    18,   104,    -1,   106,   192,   193,    24,    25,    -1,
-      -1,    -1,    -1,    -1,    31,    32,    -1,    -1,    35,   121,
-      37,    -1,    39,    40,    -1,    -1,    -1,    44,     6,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    53,   139,   140,    -1,
-      57,    -1,    -1,    -1,    -1,    -1,    63,    -1,    65,    -1,
-      -1,    -1,    -1,    -1,    -1,    33,    -1,    -1,    75,    76,
-      -1,    -1,    79,    80,    -1,    -1,    -1,    84,    85,    -1,
-      -1,    88,    89,   175,    52,   177,    -1,    55,    -1,    -1,
-      97,    -1,    -1,   185,    -1,    -1,    -1,   189,    -1,    -1,
-      -1,    -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,
-     117,    -1,    -1,    -1,    -1,    12,    -1,    14,    15,    -1,
-     127,    -1,    -1,    -1,    21,   132,    23,   134,    -1,   136,
-     137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    41,   146,
-     147,   148,   149,   150,   151,   152,   153,    50,    -1,   156,
-      -1,   158,    -1,    -1,    51,    58,    -1,    -1,    -1,    -1,
-     167,    -1,    -1,   131,    -1,   172,   173,   174,    -1,   176,
-     177,    -1,    -1,    -1,    77,    78,   183,   184,    81,    -1,
-      -1,    -1,    -1,    -1,    87,    -1,   193,    -1,    -1,    -1,
-      -1,   159,   160,   161,   162,    92,    -1,    94,    -1,   167,
-      -1,    -1,    -1,   100,    -1,   102,    -1,    -1,   105,    -1,
-      -1,   114,   115,    -1,    -1,   118,   119,   120,    -1,   122,
-     123,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   128,   129,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      15,    51,   192,    43,    67,    46,    68,     4,    46,    67,
+      58,    22,   158,   206,     5,   166,   167,    30,    37,   209,
+       1,   281,    30,   283,   217,    40,    35,    67,    73,    10,
+      75,    67,    29,   203,   204,    16,    17,    18,   201,    23,
+      71,    60,    67,    27,    25,    26,    61,   172,    63,     3,
+      61,    32,    33,   172,    67,    36,    99,    38,    67,    40,
+      41,    92,   158,   101,    45,    73,    85,    75,   111,   172,
+     260,   217,   172,    54,   172,   335,   336,   172,    59,   127,
+      67,    72,   144,    74,   172,    66,   172,    68,    11,    67,
+      67,   172,   172,    47,    48,    49,    50,    78,    79,   172,
+      81,    82,    67,     0,    88,    86,    87,   203,   204,    90,
+      91,   201,    67,    31,   216,   112,     7,     8,    99,   172,
+     135,   172,    67,   120,   187,   163,    35,   172,   279,   280,
+     172,    67,   113,   148,   115,   116,   177,    28,    56,    32,
+     121,    59,   139,   183,   172,    71,   406,    40,    30,    30,
+     131,    44,   106,   137,   162,   136,   214,   138,   213,   140,
+      67,   142,   143,   147,   172,   172,   150,    67,    67,    67,
+     172,   152,   153,   154,   155,   156,   157,   158,   201,    70,
+     161,   172,   105,   164,   374,   166,   172,   338,   111,    67,
+     174,    84,   172,    67,   175,   179,    67,   151,   195,   180,
+     181,   182,   199,   184,   185,   196,    67,    39,   172,   100,
+     191,   192,   207,   208,   209,   210,   211,   171,   201,   213,
+     201,   202,   176,   177,   117,   207,   208,   209,   210,   211,
+     148,   149,   282,   172,    30,   217,   212,   155,   428,    10,
+      67,    67,   172,   433,   213,    16,    17,    18,   201,   216,
+      67,    55,   215,   205,    25,    26,   213,   206,   201,   201,
+     450,    32,    33,   213,   201,    36,   213,    38,   216,    40,
+      41,   206,   106,   145,    45,    12,   172,   190,   132,   258,
+     214,   161,   173,    54,    29,   312,   261,   178,    59,   430,
+     444,   341,   370,   186,    -1,    66,    -1,    68,    -1,    -1,
+      62,    63,    64,    65,    -1,    -1,    -1,    78,    79,    -1,
+      81,    82,    -1,    -1,    -1,    86,    87,    -1,    -1,    90,
+      91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,    -1,
+      -1,    93,    -1,    95,     8,    97,    -1,    -1,    -1,    13,
+      -1,   103,   113,    -1,   115,   116,    20,    -1,    -1,    -1,
+     121,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,   136,    -1,   138,    -1,   140,
+      -1,   142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   152,   153,   154,   155,   156,   157,   158,    -1,    -1,
+     161,    -1,    -1,   164,    -1,   166,    -1,    -1,    -1,    -1,
+     415,    -1,    76,    -1,   175,    -1,    -1,    -1,    -1,   180,
+     181,   182,    -1,   184,   185,    -1,    -1,    10,    -1,     9,
+     191,   192,    -1,    16,    17,    18,    -1,    -1,    -1,    19,
+     201,   202,    25,    26,    -1,    -1,   110,   111,    -1,    32,
+      33,    -1,    -1,    36,    -1,    38,    -1,    40,    41,     6,
+      -1,    -1,    45,    -1,    -1,   129,    -1,    -1,    -1,    -1,
+     134,    54,    -1,    -1,    -1,    -1,    59,    -1,    58,    59,
+      -1,    -1,    -1,    66,    -1,    68,    -1,    34,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    78,    79,    77,    81,    82,
+      -1,   165,    -1,    86,    87,    -1,    53,    90,    91,    -1,
+      57,    -1,    -1,    -1,    -1,    -1,    99,    -1,    98,    -1,
+      -1,    -1,    -1,    -1,   188,   189,   190,   107,    -1,   109,
+     113,    -1,   115,   116,    -1,    -1,    -1,    -1,   121,    -1,
+      -1,    -1,    -1,    -1,    -1,   125,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,   136,    -1,   138,    -1,   140,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   145,   146,    -1,    -1,   152,
+     153,   154,   155,   156,   157,   158,    -1,    -1,   161,    -1,
+      -1,   164,    -1,   166,    -1,    -1,    42,    -1,   135,    -1,
+      -1,    -1,   175,    -1,    -1,    51,    -1,   180,   181,   182,
+      -1,   184,   185,   183,    60,   185,    -1,    -1,   191,   192,
+      -1,    -1,    -1,   193,    -1,    -1,    -1,   197,   198,   202,
+     167,   168,   169,   170,    80,    -1,    -1,    83,   175,    12,
+      -1,    14,    15,    89,    -1,    -1,    -1,    -1,    21,    -1,
+      -1,    24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,    -1,
+      -1,    -1,   118,   119,    -1,    -1,   122,   123,   124,    52,
+     126,   127,   128,    -1,   130,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   185
+      -1,    -1,    -1,   159,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    94,    -1,    96,    -1,    -1,    -1,    -1,    -1,   102,
+      -1,   104,    -1,    -1,    -1,   108,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   193,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   132,
+     133
 };
 
   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1331,88 +1377,91 @@
      symbol of state STATE-NUM.  */
 static const yytype_uint16 yystos[] =
 {
-       0,     1,    10,    16,    17,    18,    24,    25,    31,    32,
-      35,    37,    39,    40,    44,    53,    57,    63,    65,    75,
-      76,    79,    80,    84,    85,    88,    89,    97,   110,   111,
-     112,   117,   127,   132,   134,   136,   137,   146,   147,   148,
-     149,   150,   151,   152,   153,   156,   158,   167,   172,   173,
-     174,   176,   177,   183,   184,   193,   209,   210,   211,   212,
-     213,   225,   226,   227,   228,   232,   237,   245,   255,   260,
-     264,   269,   273,   274,   275,   276,   277,   285,   286,   289,
-     301,   302,   192,    64,    64,   229,     8,    13,    20,    73,
-     107,   108,   125,   130,   157,   180,   181,   182,   265,   266,
-     267,   268,    11,   103,   108,   249,   250,   251,   164,   278,
-     265,    22,    26,    86,   133,   141,   144,   166,   171,   239,
-      70,    72,   164,   214,   215,   216,   164,   164,   164,   164,
-     283,   284,   214,   297,    64,    59,    60,    61,    62,    91,
-      93,    95,   101,   252,   253,   254,   297,   164,   164,   296,
-      64,     7,     8,    27,    67,    98,   165,   170,   290,   291,
-      29,    70,    72,   154,   214,    64,    45,    99,   155,   261,
-     262,   263,   164,   279,   238,   239,   164,     6,    33,    52,
-      55,   131,   159,   160,   161,   162,   167,   270,   271,   272,
-      12,    14,    15,    21,    23,    51,    92,    94,   100,   102,
-     105,   128,   129,   233,   234,   235,   236,   300,   215,    64,
-     204,   293,   294,   295,    64,   292,     0,   211,   192,   214,
-     214,    34,    64,   299,    64,   164,   164,    36,    58,    83,
-     288,   206,    30,    54,    57,   142,   143,   149,   230,   231,
-     266,   250,    64,    34,   240,     3,    46,    47,    48,    49,
-     145,   163,   168,   169,   256,   257,   258,   259,   164,   211,
-     284,   214,   253,    64,   164,   291,    68,   246,    29,    29,
-     246,    90,   246,   262,    64,   203,   239,   271,   299,   164,
-      42,    64,   175,   298,   234,    64,   299,   281,    64,   294,
-      64,   192,   217,     5,    69,    71,   164,   188,   287,   194,
-     195,   303,   304,   305,    64,   164,    31,    39,    43,    82,
-     113,   178,   241,   242,   243,   164,   164,    64,   257,   299,
-     298,    64,   247,   246,   246,   247,   215,   247,   164,    65,
-     138,   282,    38,     9,    19,    56,    57,    74,    96,   104,
-     106,   121,   139,   140,   175,   177,   185,   189,   218,   219,
-     220,   221,   222,   223,   224,   152,   304,   306,   307,   309,
-     192,   203,   164,     4,    28,   109,   116,   135,   187,   190,
-     244,    41,    50,    58,    77,    78,    81,    87,   114,   115,
-     118,   119,   120,   122,   123,   124,   126,   185,   248,   247,
-     247,   246,    29,   280,   215,    64,    64,    64,   179,   164,
-     203,   192,   207,   307,   206,   299,   247,   205,   214,   196,
-     308,   203,   197,   310,   311,   299,   203,   207,   311,   192,
-     299,   206,   198,   199,   200,   201,   202,   312,   313,   314,
-     207,   313,   192,   203,   192,   299
+       0,     1,    10,    16,    17,    18,    25,    26,    32,    33,
+      36,    38,    40,    41,    45,    54,    59,    66,    68,    78,
+      79,    81,    82,    86,    87,    90,    91,    99,   113,   115,
+     116,   121,   131,   136,   138,   140,   142,   143,   152,   153,
+     154,   155,   156,   157,   158,   161,   164,   166,   175,   180,
+     181,   182,   184,   185,   191,   192,   202,   219,   220,   221,
+     222,   223,   235,   236,   237,   238,   242,   247,   255,   265,
+     270,   274,   279,   283,   284,   285,   287,   288,   299,   300,
+     303,   315,   316,   201,    67,    67,   239,     8,    13,    20,
+      76,   110,   111,   129,   134,   165,   188,   189,   190,   275,
+     276,   277,   278,    11,   105,   111,   259,   260,   261,   172,
+     289,   275,    23,    27,    88,   137,   147,   150,   174,   179,
+     249,    73,    75,   172,   224,   225,   226,   172,   172,   172,
+     172,   172,   297,   298,   224,   311,    67,    62,    63,    64,
+      65,    93,    95,    97,   103,   262,   263,   264,   311,   172,
+     172,   310,   290,    67,     7,     8,    28,    70,   100,   173,
+     178,   304,   305,    30,    73,    75,   162,   224,    67,    46,
+     101,   163,   271,   272,   273,   172,   293,   248,   249,   172,
+       6,    34,    53,    57,   135,   167,   168,   169,   170,   175,
+     280,   281,   282,    12,    14,    15,    21,    24,    52,    94,
+      96,   102,   104,   108,   132,   133,   243,   244,   245,   246,
+     314,   225,    67,   214,   307,   308,   309,    67,   306,     0,
+     221,   201,   224,   224,    35,    67,   313,    67,   172,   172,
+      37,    60,    85,   302,   216,    31,    56,    59,   148,   149,
+     155,   240,   241,   276,   260,    67,    35,   250,     3,    47,
+      48,    49,    50,   106,   151,   171,   176,   177,   266,   267,
+     268,   269,   172,   221,    22,    61,   286,   298,   224,   263,
+      67,   172,    30,    67,   291,   292,   305,    71,   256,    30,
+      30,   256,    92,   256,   272,    67,   213,   249,   281,   313,
+     172,    43,    67,   183,   312,   244,    67,   313,   295,    67,
+     308,    67,   201,   227,     5,    72,    74,   172,   196,   301,
+     203,   204,   317,   318,   319,    67,   172,    32,    40,    44,
+      84,   117,   186,   251,   252,   253,   172,   172,    67,   267,
+     313,   312,    67,    67,   257,   256,   256,   257,   225,   257,
+     172,    68,   144,   296,    39,     9,    19,    58,    59,    77,
+      98,   107,   109,   125,   145,   146,   183,   185,   193,   197,
+     198,   228,   229,   230,   231,   232,   233,   234,   158,   318,
+     320,   321,   323,   201,   213,   172,     4,    29,   112,   120,
+     139,   195,   199,   254,   212,    42,    51,    60,    80,    83,
+      89,   114,   118,   119,   122,   123,   124,   126,   127,   128,
+     130,   159,   193,   258,   257,   257,   256,    30,   294,   225,
+      67,    67,    67,   187,   172,   213,   201,   217,   321,   216,
+     313,    67,    55,   257,   215,   224,   205,   322,   213,   206,
+     324,   325,   313,   213,   217,   325,   201,   313,   216,   207,
+     208,   209,   210,   211,   326,   327,   328,   217,   327,   201,
+     213,   201,   313
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint16 yyr1[] =
 {
-       0,   208,   209,   210,   210,   210,   211,   211,   211,   211,
-     211,   211,   211,   211,   211,   211,   211,   211,   211,   211,
-     212,   213,   213,   213,   213,   213,   214,   214,   215,   216,
-     216,   217,   217,   218,   218,   218,   219,   220,   220,   220,
-     220,   220,   220,   220,   220,   221,   221,   222,   222,   222,
-     222,   222,   222,   223,   224,   225,   226,   226,   227,   227,
-     227,   227,   228,   228,   228,   228,   228,   228,   228,   228,
-     228,   229,   229,   230,   230,   231,   231,   231,   231,   231,
-     232,   233,   233,   234,   234,   234,   234,   235,   235,   235,
-     235,   235,   235,   235,   235,   235,   236,   236,   237,   237,
-     237,   238,   238,   239,   239,   239,   239,   239,   239,   239,
-     239,   240,   240,   241,   241,   241,   241,   242,   242,   243,
-     243,   244,   244,   244,   244,   244,   244,   244,   245,   245,
-     245,   245,   245,   245,   245,   245,   246,   246,   247,   247,
-     248,   248,   248,   248,   248,   248,   248,   248,   248,   248,
-     248,   248,   248,   248,   248,   248,   248,   249,   249,   250,
-     251,   251,   251,   252,   252,   253,   254,   254,   254,   254,
-     254,   254,   254,   254,   255,   256,   256,   257,   257,   257,
-     257,   257,   258,   258,   259,   259,   259,   259,   260,   261,
-     261,   262,   263,   263,   263,   264,   264,   265,   265,   266,
-     266,   267,   267,   267,   267,   267,   267,   268,   268,   268,
-     268,   268,   268,   269,   270,   270,   271,   272,   272,   272,
-     272,   272,   272,   272,   272,   272,   272,   273,   273,   273,
-     273,   273,   273,   273,   273,   273,   273,   273,   273,   273,
-     273,   274,   274,   274,   275,   275,   276,   276,   277,   277,
-     277,   278,   278,   278,   279,   280,   280,   281,   281,   282,
-     282,   283,   283,   284,   285,   285,   286,   286,   287,   287,
-     287,   287,   288,   288,   288,   289,   290,   290,   291,   291,
-     291,   291,   291,   291,   291,   292,   292,   293,   293,   294,
-     294,   295,   296,   296,   297,   297,   298,   298,   298,   299,
-     299,   300,   301,   302,   303,   303,   304,   305,   305,   306,
-     306,   307,   308,   309,   310,   310,   311,   312,   312,   313,
-     314,   314,   314,   314,   314
+       0,   218,   219,   220,   220,   220,   221,   221,   221,   221,
+     221,   221,   221,   221,   221,   221,   221,   221,   221,   221,
+     222,   223,   223,   223,   223,   223,   224,   224,   225,   226,
+     226,   227,   227,   228,   228,   228,   229,   230,   230,   230,
+     230,   230,   230,   230,   230,   230,   231,   231,   232,   232,
+     232,   232,   232,   232,   233,   234,   235,   236,   236,   237,
+     237,   237,   237,   238,   238,   238,   238,   238,   238,   238,
+     238,   238,   239,   239,   240,   240,   241,   241,   241,   241,
+     241,   242,   243,   243,   244,   244,   244,   244,   245,   245,
+     245,   245,   245,   245,   245,   245,   245,   246,   246,   247,
+     247,   247,   248,   248,   249,   249,   249,   249,   249,   249,
+     249,   249,   250,   250,   251,   251,   251,   251,   252,   252,
+     253,   253,   254,   254,   254,   254,   254,   254,   254,   255,
+     255,   255,   255,   255,   255,   255,   255,   256,   256,   257,
+     257,   257,   258,   258,   258,   258,   258,   258,   258,   258,
+     258,   258,   258,   258,   258,   258,   258,   258,   258,   259,
+     259,   260,   261,   261,   261,   262,   262,   263,   264,   264,
+     264,   264,   264,   264,   264,   264,   265,   266,   266,   267,
+     267,   267,   267,   267,   268,   268,   268,   269,   269,   269,
+     269,   270,   271,   271,   272,   273,   273,   273,   274,   274,
+     275,   275,   276,   276,   277,   277,   277,   277,   277,   277,
+     278,   278,   278,   278,   278,   278,   279,   280,   280,   281,
+     282,   282,   282,   282,   282,   282,   282,   282,   282,   282,
+     283,   283,   283,   283,   283,   283,   283,   283,   283,   283,
+     283,   283,   283,   283,   283,   283,   284,   284,   284,   285,
+     285,   286,   286,   286,   287,   288,   288,   288,   289,   289,
+     289,   290,   290,   291,   292,   292,   293,   294,   294,   295,
+     295,   296,   296,   297,   297,   298,   299,   299,   300,   300,
+     301,   301,   301,   301,   302,   302,   302,   303,   304,   304,
+     305,   305,   305,   305,   305,   305,   305,   306,   306,   307,
+     307,   308,   308,   309,   310,   310,   311,   311,   312,   312,
+     312,   313,   313,   314,   315,   316,   317,   317,   318,   319,
+     319,   320,   320,   321,   322,   323,   324,   324,   325,   326,
+     326,   327,   328,   328,   328,   328,   328
 };
 
   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
@@ -1422,35 +1471,36 @@
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        3,     1,     1,     1,     1,     1,     1,     2,     1,     1,
        1,     0,     2,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     2,     2,     1,     1,     1,
-       1,     1,     1,     2,     1,     2,     1,     1,     1,     2,
+       1,     1,     1,     1,     1,     1,     2,     2,     1,     1,
+       1,     1,     1,     1,     2,     1,     2,     1,     1,     1,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     0,     2,     2,     2,     1,     1,     1,     1,     1,
-       2,     2,     1,     2,     2,     2,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
-       3,     2,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     0,     2,     2,     2,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
-       4,     6,     4,     5,     5,     4,     0,     2,     0,     2,
+       2,     2,     0,     2,     2,     2,     1,     1,     1,     1,
+       1,     2,     2,     1,     2,     2,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
+       2,     3,     2,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     0,     2,     2,     2,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
+       2,     4,     6,     4,     5,     5,     4,     0,     2,     0,
+       2,     3,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
+       1,     2,     1,     1,     1,     2,     1,     2,     1,     1,
+       1,     1,     1,     1,     1,     1,     3,     2,     1,     2,
+       2,     2,     2,     2,     1,     1,     1,     1,     1,     1,
+       1,     2,     2,     1,     2,     1,     1,     1,     2,     2,
+       2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     2,     2,     1,     2,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     2,     2,     2,     2,     3,     3,     1,     2,
+       2,     2,     2,     2,     3,     2,     1,     1,     1,     1,
+       1,     1,     1,     0,     1,     1,     1,     1,     1,     2,
+       0,     0,     2,     4,     1,     1,     4,     1,     0,     0,
+       2,     2,     2,     2,     1,     1,     3,     3,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     2,     2,     1,
        1,     1,     1,     1,     1,     1,     1,     2,     1,     2,
-       1,     1,     1,     2,     1,     2,     1,     1,     1,     1,
-       1,     1,     1,     1,     3,     2,     1,     2,     2,     2,
-       2,     2,     1,     1,     1,     1,     1,     1,     2,     2,
-       1,     2,     1,     1,     1,     2,     2,     2,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     2,     2,     1,     2,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
-       2,     2,     2,     3,     1,     2,     2,     2,     2,     3,
-       2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     2,     0,     4,     1,     0,     0,     2,     2,
-       2,     2,     1,     1,     3,     3,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     2,     2,     1,     1,     1,
-       1,     1,     1,     1,     1,     2,     1,     2,     1,     1,
-       1,     5,     2,     1,     2,     1,     1,     1,     1,     1,
-       1,     2,     5,     1,     3,     2,     3,     1,     1,     2,
-       1,     5,     4,     3,     2,     1,     6,     3,     2,     3,
-       1,     1,     1,     1,     1
+       1,     1,     1,     5,     2,     1,     2,     1,     1,     1,
+       1,     1,     1,     2,     5,     1,     3,     2,     3,     1,
+       1,     2,     1,     5,     4,     3,     2,     1,     6,     3,
+       2,     3,     1,     1,     1,     1,     1
 };
 
 
@@ -2127,7 +2177,7 @@
   switch (yyn)
     {
         case 5:
-#line 385 "ntp_parser.y" /* yacc.c:1646  */
+#line 398 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			/* I will need to incorporate much more fine grained
 			 * error messages. The following should suffice for
@@ -2140,11 +2190,11 @@
 				ip_ctx->errpos.nline,
 				ip_ctx->errpos.ncol);
 		}
-#line 2144 "ntp_parser.c" /* yacc.c:1646  */
+#line 2194 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 20:
-#line 421 "ntp_parser.y" /* yacc.c:1646  */
+#line 434 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			peer_node *my_node;
 
@@ -2151,74 +2201,74 @@
 			my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
 			APPEND_G_FIFO(cfgt.peers, my_node);
 		}
-#line 2155 "ntp_parser.c" /* yacc.c:1646  */
+#line 2205 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 27:
-#line 440 "ntp_parser.y" /* yacc.c:1646  */
+#line 453 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2161 "ntp_parser.c" /* yacc.c:1646  */
+#line 2211 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 28:
-#line 445 "ntp_parser.y" /* yacc.c:1646  */
+#line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2167 "ntp_parser.c" /* yacc.c:1646  */
+#line 2217 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 29:
-#line 450 "ntp_parser.y" /* yacc.c:1646  */
+#line 463 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = AF_INET; }
-#line 2173 "ntp_parser.c" /* yacc.c:1646  */
+#line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 30:
-#line 452 "ntp_parser.y" /* yacc.c:1646  */
+#line 465 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = AF_INET6; }
-#line 2179 "ntp_parser.c" /* yacc.c:1646  */
+#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 31:
-#line 457 "ntp_parser.y" /* yacc.c:1646  */
+#line 470 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val_fifo) = NULL; }
-#line 2185 "ntp_parser.c" /* yacc.c:1646  */
+#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 32:
-#line 459 "ntp_parser.y" /* yacc.c:1646  */
+#line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2194 "ntp_parser.c" /* yacc.c:1646  */
+#line 2244 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 36:
-#line 473 "ntp_parser.y" /* yacc.c:1646  */
+#line 486 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2200 "ntp_parser.c" /* yacc.c:1646  */
+#line 2250 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 45:
-#line 489 "ntp_parser.y" /* yacc.c:1646  */
+  case 46:
+#line 503 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2206 "ntp_parser.c" /* yacc.c:1646  */
+#line 2256 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 46:
-#line 491 "ntp_parser.y" /* yacc.c:1646  */
+  case 47:
+#line 505 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2212 "ntp_parser.c" /* yacc.c:1646  */
+#line 2262 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 53:
-#line 505 "ntp_parser.y" /* yacc.c:1646  */
+  case 54:
+#line 519 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2218 "ntp_parser.c" /* yacc.c:1646  */
+#line 2268 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 55:
-#line 519 "ntp_parser.y" /* yacc.c:1646  */
+  case 56:
+#line 533 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			unpeer_node *my_node;
 
@@ -2226,35 +2276,35 @@
 			if (my_node)
 				APPEND_G_FIFO(cfgt.unpeers, my_node);
 		}
-#line 2230 "ntp_parser.c" /* yacc.c:1646  */
+#line 2280 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 58:
-#line 540 "ntp_parser.y" /* yacc.c:1646  */
+  case 59:
+#line 554 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.broadcastclient = 1; }
-#line 2236 "ntp_parser.c" /* yacc.c:1646  */
+#line 2286 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 59:
-#line 542 "ntp_parser.y" /* yacc.c:1646  */
+  case 60:
+#line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2242 "ntp_parser.c" /* yacc.c:1646  */
+#line 2292 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 60:
-#line 544 "ntp_parser.y" /* yacc.c:1646  */
+  case 61:
+#line 558 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2248 "ntp_parser.c" /* yacc.c:1646  */
+#line 2298 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 61:
-#line 546 "ntp_parser.y" /* yacc.c:1646  */
+  case 62:
+#line 560 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2254 "ntp_parser.c" /* yacc.c:1646  */
+#line 2304 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 62:
-#line 557 "ntp_parser.y" /* yacc.c:1646  */
+  case 63:
+#line 571 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			attr_val *atrv;
 
@@ -2261,50 +2311,50 @@
 			atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
 			APPEND_G_FIFO(cfgt.vars, atrv);
 		}
-#line 2265 "ntp_parser.c" /* yacc.c:1646  */
+#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 63:
-#line 564 "ntp_parser.y" /* yacc.c:1646  */
+  case 64:
+#line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2271 "ntp_parser.c" /* yacc.c:1646  */
+#line 2321 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 64:
-#line 566 "ntp_parser.y" /* yacc.c:1646  */
+  case 65:
+#line 580 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			cfgt.auth.cryptosw++;
 			CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
 		}
-#line 2280 "ntp_parser.c" /* yacc.c:1646  */
+#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 65:
-#line 571 "ntp_parser.y" /* yacc.c:1646  */
+  case 66:
+#line 585 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.keys = (yyvsp[0].String); }
-#line 2286 "ntp_parser.c" /* yacc.c:1646  */
+#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 66:
-#line 573 "ntp_parser.y" /* yacc.c:1646  */
+  case 67:
+#line 587 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2292 "ntp_parser.c" /* yacc.c:1646  */
+#line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 67:
-#line 575 "ntp_parser.y" /* yacc.c:1646  */
+  case 68:
+#line 589 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2298 "ntp_parser.c" /* yacc.c:1646  */
+#line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 68:
-#line 577 "ntp_parser.y" /* yacc.c:1646  */
+  case 69:
+#line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2304 "ntp_parser.c" /* yacc.c:1646  */
+#line 2354 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 69:
-#line 579 "ntp_parser.y" /* yacc.c:1646  */
+  case 70:
+#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			/* [Bug 948] leaves it open if appending or
 			 * replacing the trusted key list is the right
@@ -2314,38 +2364,38 @@
 			DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
 			CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
 		}
-#line 2318 "ntp_parser.c" /* yacc.c:1646  */
+#line 2368 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 70:
-#line 589 "ntp_parser.y" /* yacc.c:1646  */
+  case 71:
+#line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2324 "ntp_parser.c" /* yacc.c:1646  */
+#line 2374 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 71:
-#line 594 "ntp_parser.y" /* yacc.c:1646  */
+  case 72:
+#line 608 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val_fifo) = NULL; }
-#line 2330 "ntp_parser.c" /* yacc.c:1646  */
+#line 2380 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 72:
-#line 596 "ntp_parser.y" /* yacc.c:1646  */
+  case 73:
+#line 610 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2339 "ntp_parser.c" /* yacc.c:1646  */
+#line 2389 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 73:
-#line 604 "ntp_parser.y" /* yacc.c:1646  */
+  case 74:
+#line 618 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2345 "ntp_parser.c" /* yacc.c:1646  */
+#line 2395 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 74:
-#line 606 "ntp_parser.y" /* yacc.c:1646  */
+  case 75:
+#line 620 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val) = NULL;
 			cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2354,65 +2404,65 @@
 				"please use 'revoke %d' instead.",
 				cfgt.auth.revoke, cfgt.auth.revoke);
 		}
-#line 2358 "ntp_parser.c" /* yacc.c:1646  */
+#line 2408 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 80:
-#line 631 "ntp_parser.y" /* yacc.c:1646  */
+  case 81:
+#line 645 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2364 "ntp_parser.c" /* yacc.c:1646  */
+#line 2414 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 81:
-#line 636 "ntp_parser.y" /* yacc.c:1646  */
+  case 82:
+#line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2373 "ntp_parser.c" /* yacc.c:1646  */
+#line 2423 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 82:
-#line 641 "ntp_parser.y" /* yacc.c:1646  */
+  case 83:
+#line 655 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2382 "ntp_parser.c" /* yacc.c:1646  */
+#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 83:
-#line 649 "ntp_parser.y" /* yacc.c:1646  */
+  case 84:
+#line 663 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2388 "ntp_parser.c" /* yacc.c:1646  */
+#line 2438 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 84:
-#line 651 "ntp_parser.y" /* yacc.c:1646  */
+  case 85:
+#line 665 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2394 "ntp_parser.c" /* yacc.c:1646  */
+#line 2444 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 85:
-#line 653 "ntp_parser.y" /* yacc.c:1646  */
+  case 86:
+#line 667 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2400 "ntp_parser.c" /* yacc.c:1646  */
+#line 2450 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 86:
-#line 655 "ntp_parser.y" /* yacc.c:1646  */
+  case 87:
+#line 669 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
-#line 2406 "ntp_parser.c" /* yacc.c:1646  */
+#line 2456 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 98:
-#line 682 "ntp_parser.y" /* yacc.c:1646  */
+  case 99:
+#line 696 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2412 "ntp_parser.c" /* yacc.c:1646  */
+#line 2462 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 99:
-#line 684 "ntp_parser.y" /* yacc.c:1646  */
+  case 100:
+#line 698 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				cfgt.stats_dir = (yyvsp[0].String);
@@ -2421,11 +2471,11 @@
 				yyerror("statsdir remote configuration ignored");
 			}
 		}
-#line 2425 "ntp_parser.c" /* yacc.c:1646  */
+#line 2475 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 100:
-#line 693 "ntp_parser.y" /* yacc.c:1646  */
+  case 101:
+#line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			filegen_node *fgn;
 
@@ -2432,44 +2482,44 @@
 			fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
 			APPEND_G_FIFO(cfgt.filegen_opts, fgn);
 		}
-#line 2436 "ntp_parser.c" /* yacc.c:1646  */
+#line 2486 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 101:
-#line 703 "ntp_parser.y" /* yacc.c:1646  */
+  case 102:
+#line 717 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
 			APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 2445 "ntp_parser.c" /* yacc.c:1646  */
+#line 2495 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 102:
-#line 708 "ntp_parser.y" /* yacc.c:1646  */
+  case 103:
+#line 722 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Int_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 2454 "ntp_parser.c" /* yacc.c:1646  */
+#line 2504 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 111:
-#line 727 "ntp_parser.y" /* yacc.c:1646  */
+  case 112:
+#line 741 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val_fifo) = NULL; }
-#line 2460 "ntp_parser.c" /* yacc.c:1646  */
+#line 2510 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 112:
-#line 729 "ntp_parser.y" /* yacc.c:1646  */
+  case 113:
+#line 743 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2469 "ntp_parser.c" /* yacc.c:1646  */
+#line 2519 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 113:
-#line 737 "ntp_parser.y" /* yacc.c:1646  */
+  case 114:
+#line 751 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2479,11 +2529,11 @@
 				yyerror("filegen file remote config ignored");
 			}
 		}
-#line 2483 "ntp_parser.c" /* yacc.c:1646  */
+#line 2533 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 114:
-#line 747 "ntp_parser.y" /* yacc.c:1646  */
+  case 115:
+#line 761 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2492,11 +2542,11 @@
 				yyerror("filegen type remote config ignored");
 			}
 		}
-#line 2496 "ntp_parser.c" /* yacc.c:1646  */
+#line 2546 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 115:
-#line 756 "ntp_parser.y" /* yacc.c:1646  */
+  case 116:
+#line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			const char *err;
 
@@ -2511,69 +2561,69 @@
 				yyerror(err);
 			}
 		}
-#line 2515 "ntp_parser.c" /* yacc.c:1646  */
+#line 2565 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 116:
-#line 771 "ntp_parser.y" /* yacc.c:1646  */
+  case 117:
+#line 785 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2521 "ntp_parser.c" /* yacc.c:1646  */
+#line 2571 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 128:
-#line 801 "ntp_parser.y" /* yacc.c:1646  */
+  case 129:
+#line 815 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
 		}
-#line 2529 "ntp_parser.c" /* yacc.c:1646  */
+#line 2579 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 129:
-#line 805 "ntp_parser.y" /* yacc.c:1646  */
+  case 130:
+#line 819 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
 		}
-#line 2537 "ntp_parser.c" /* yacc.c:1646  */
+#line 2587 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 130:
-#line 809 "ntp_parser.y" /* yacc.c:1646  */
+  case 131:
+#line 823 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *rn;
 
-			rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
+			rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
 						  lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2549 "ntp_parser.c" /* yacc.c:1646  */
+#line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 131:
-#line 817 "ntp_parser.y" /* yacc.c:1646  */
+  case 132:
+#line 831 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *rn;
 
-			rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
+			rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
 						  lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2561 "ntp_parser.c" /* yacc.c:1646  */
+#line 2611 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 132:
-#line 825 "ntp_parser.y" /* yacc.c:1646  */
+  case 133:
+#line 839 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *rn;
 
-			rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
+			rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
 						  lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2573 "ntp_parser.c" /* yacc.c:1646  */
+#line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 133:
-#line 833 "ntp_parser.y" /* yacc.c:1646  */
+  case 134:
+#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *rn;
 
@@ -2584,15 +2634,15 @@
 				create_address_node(
 					estrdup("0.0.0.0"),
 					AF_INET),
-				(yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
+				(yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
 				lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2592 "ntp_parser.c" /* yacc.c:1646  */
+#line 2642 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 134:
-#line 848 "ntp_parser.y" /* yacc.c:1646  */
+  case 135:
+#line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *rn;
 
@@ -2603,34 +2653,34 @@
 				create_address_node(
 					estrdup("::"),
 					AF_INET6),
-				(yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
+				(yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
 				lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2611 "ntp_parser.c" /* yacc.c:1646  */
+#line 2661 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 135:
-#line 863 "ntp_parser.y" /* yacc.c:1646  */
+  case 136:
+#line 877 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			restrict_node *	rn;
 
-			APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer)));
+			APPEND_G_FIFO((yyvsp[0].Attr_val_fifo), create_attr_ival((yyvsp[-2].Integer), 1));
 			rn = create_restrict_node(
-				NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
+				NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), lex_current()->curpos.nline);
 			APPEND_G_FIFO(cfgt.restrict_opts, rn);
 		}
-#line 2624 "ntp_parser.c" /* yacc.c:1646  */
+#line 2674 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 136:
-#line 875 "ntp_parser.y" /* yacc.c:1646  */
+  case 137:
+#line 889 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = -1; }
-#line 2630 "ntp_parser.c" /* yacc.c:1646  */
+#line 2680 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 137:
-#line 877 "ntp_parser.y" /* yacc.c:1646  */
+  case 138:
+#line 891 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
 				struct FILE_INFO * ip_ctx;
@@ -2646,74 +2696,89 @@
 			}
 			(yyval.Integer) = (yyvsp[0].Integer);
 		}
-#line 2650 "ntp_parser.c" /* yacc.c:1646  */
+#line 2700 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 138:
-#line 896 "ntp_parser.y" /* yacc.c:1646  */
-    { (yyval.Int_fifo) = NULL; }
-#line 2656 "ntp_parser.c" /* yacc.c:1646  */
+  case 139:
+#line 910 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val_fifo) = NULL; }
+#line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 139:
-#line 898 "ntp_parser.y" /* yacc.c:1646  */
+  case 140:
+#line 912 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
-			(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
-			APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
+			attr_val *av;
+
+			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+			av = create_attr_ival((yyvsp[0].Integer), 1);
+			APPEND_G_FIFO((yyval.Attr_val_fifo), av);
 		}
-#line 2665 "ntp_parser.c" /* yacc.c:1646  */
+#line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 157:
-#line 926 "ntp_parser.y" /* yacc.c:1646  */
+  case 141:
+#line 920 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
+			attr_val *av;
+
+			(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
+			av = create_attr_ival(T_ServerresponseFuzz, 1);
+			APPEND_G_FIFO((yyval.Attr_val_fifo), av);
+		}
+#line 2730 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 159:
+#line 951 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2674 "ntp_parser.c" /* yacc.c:1646  */
+#line 2739 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 158:
-#line 931 "ntp_parser.y" /* yacc.c:1646  */
+  case 160:
+#line 956 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2683 "ntp_parser.c" /* yacc.c:1646  */
+#line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 159:
-#line 939 "ntp_parser.y" /* yacc.c:1646  */
+  case 161:
+#line 964 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2689 "ntp_parser.c" /* yacc.c:1646  */
+#line 2754 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 163:
-#line 950 "ntp_parser.y" /* yacc.c:1646  */
+  case 165:
+#line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2698 "ntp_parser.c" /* yacc.c:1646  */
+#line 2763 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 164:
-#line 955 "ntp_parser.y" /* yacc.c:1646  */
+  case 166:
+#line 980 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2707 "ntp_parser.c" /* yacc.c:1646  */
+#line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 165:
-#line 963 "ntp_parser.y" /* yacc.c:1646  */
+  case 167:
+#line 988 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2713 "ntp_parser.c" /* yacc.c:1646  */
+#line 2778 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 174:
-#line 983 "ntp_parser.y" /* yacc.c:1646  */
+  case 176:
+#line 1008 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			addr_opts_node *aon;
 
@@ -2720,41 +2785,41 @@
 			aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
 			APPEND_G_FIFO(cfgt.fudge, aon);
 		}
-#line 2724 "ntp_parser.c" /* yacc.c:1646  */
+#line 2789 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 175:
-#line 993 "ntp_parser.y" /* yacc.c:1646  */
+  case 177:
+#line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2733 "ntp_parser.c" /* yacc.c:1646  */
+#line 2798 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 176:
-#line 998 "ntp_parser.y" /* yacc.c:1646  */
+  case 178:
+#line 1023 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2742 "ntp_parser.c" /* yacc.c:1646  */
+#line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 177:
-#line 1006 "ntp_parser.y" /* yacc.c:1646  */
+  case 179:
+#line 1031 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2748 "ntp_parser.c" /* yacc.c:1646  */
+#line 2813 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 178:
-#line 1008 "ntp_parser.y" /* yacc.c:1646  */
+  case 180:
+#line 1033 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2754 "ntp_parser.c" /* yacc.c:1646  */
+#line 2819 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 179:
-#line 1010 "ntp_parser.y" /* yacc.c:1646  */
+  case 181:
+#line 1035 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
 				(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2763,89 +2828,89 @@
 				yyerror("fudge factor: stratum value not in [0..16], ignored");
 			}
 		}
-#line 2767 "ntp_parser.c" /* yacc.c:1646  */
+#line 2832 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 180:
-#line 1019 "ntp_parser.y" /* yacc.c:1646  */
+  case 182:
+#line 1044 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2773 "ntp_parser.c" /* yacc.c:1646  */
+#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 181:
-#line 1021 "ntp_parser.y" /* yacc.c:1646  */
+  case 183:
+#line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2779 "ntp_parser.c" /* yacc.c:1646  */
+#line 2844 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 188:
-#line 1042 "ntp_parser.y" /* yacc.c:1646  */
+  case 191:
+#line 1068 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2785 "ntp_parser.c" /* yacc.c:1646  */
+#line 2850 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 189:
-#line 1047 "ntp_parser.y" /* yacc.c:1646  */
+  case 192:
+#line 1073 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2794 "ntp_parser.c" /* yacc.c:1646  */
+#line 2859 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 190:
-#line 1052 "ntp_parser.y" /* yacc.c:1646  */
+  case 193:
+#line 1078 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2803 "ntp_parser.c" /* yacc.c:1646  */
+#line 2868 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 191:
-#line 1060 "ntp_parser.y" /* yacc.c:1646  */
+  case 194:
+#line 1086 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2809 "ntp_parser.c" /* yacc.c:1646  */
+#line 2874 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 195:
-#line 1076 "ntp_parser.y" /* yacc.c:1646  */
+  case 198:
+#line 1102 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2815 "ntp_parser.c" /* yacc.c:1646  */
+#line 2880 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 196:
-#line 1078 "ntp_parser.y" /* yacc.c:1646  */
+  case 199:
+#line 1104 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2821 "ntp_parser.c" /* yacc.c:1646  */
+#line 2886 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 197:
-#line 1083 "ntp_parser.y" /* yacc.c:1646  */
+  case 200:
+#line 1109 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2830 "ntp_parser.c" /* yacc.c:1646  */
+#line 2895 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 198:
-#line 1088 "ntp_parser.y" /* yacc.c:1646  */
+  case 201:
+#line 1114 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2839 "ntp_parser.c" /* yacc.c:1646  */
+#line 2904 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 199:
-#line 1096 "ntp_parser.y" /* yacc.c:1646  */
+  case 202:
+#line 1122 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2845 "ntp_parser.c" /* yacc.c:1646  */
+#line 2910 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 200:
-#line 1098 "ntp_parser.y" /* yacc.c:1646  */
+  case 203:
+#line 1124 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2859,41 +2924,41 @@
 				yyerror(err_str);
 			}
 		}
-#line 2863 "ntp_parser.c" /* yacc.c:1646  */
+#line 2928 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 213:
-#line 1137 "ntp_parser.y" /* yacc.c:1646  */
+  case 216:
+#line 1163 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2869 "ntp_parser.c" /* yacc.c:1646  */
+#line 2934 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 214:
-#line 1142 "ntp_parser.y" /* yacc.c:1646  */
+  case 217:
+#line 1168 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2878 "ntp_parser.c" /* yacc.c:1646  */
+#line 2943 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 215:
-#line 1147 "ntp_parser.y" /* yacc.c:1646  */
+  case 218:
+#line 1173 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 2887 "ntp_parser.c" /* yacc.c:1646  */
+#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 216:
-#line 1155 "ntp_parser.y" /* yacc.c:1646  */
+  case 219:
+#line 1181 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2893 "ntp_parser.c" /* yacc.c:1646  */
+#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 229:
-#line 1180 "ntp_parser.y" /* yacc.c:1646  */
+  case 232:
+#line 1206 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			attr_val *av;
 
@@ -2900,11 +2965,11 @@
 			av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
 			APPEND_G_FIFO(cfgt.vars, av);
 		}
-#line 2904 "ntp_parser.c" /* yacc.c:1646  */
+#line 2969 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 230:
-#line 1187 "ntp_parser.y" /* yacc.c:1646  */
+  case 233:
+#line 1213 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			attr_val *av;
 
@@ -2911,11 +2976,11 @@
 			av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
 			APPEND_G_FIFO(cfgt.vars, av);
 		}
-#line 2915 "ntp_parser.c" /* yacc.c:1646  */
+#line 2980 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 231:
-#line 1194 "ntp_parser.y" /* yacc.c:1646  */
+  case 234:
+#line 1220 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			attr_val *av;
 
@@ -2922,11 +2987,11 @@
 			av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
 			APPEND_G_FIFO(cfgt.vars, av);
 		}
-#line 2926 "ntp_parser.c" /* yacc.c:1646  */
+#line 2991 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 232:
-#line 1201 "ntp_parser.y" /* yacc.c:1646  */
+  case 235:
+#line 1227 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			char error_text[64];
 			attr_val *av;
@@ -2942,11 +3007,11 @@
 				yyerror(error_text);
 			}
 		}
-#line 2946 "ntp_parser.c" /* yacc.c:1646  */
+#line 3011 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 233:
-#line 1217 "ntp_parser.y" /* yacc.c:1646  */
+  case 236:
+#line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (!lex_from_file()) {
 				YYFREE((yyvsp[-1].String)); /* avoid leak */
@@ -2965,41 +3030,59 @@
 			}
 			YYFREE((yyvsp[-1].String)); /* avoid leak */
 		}
-#line 2969 "ntp_parser.c" /* yacc.c:1646  */
+#line 3034 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 234:
-#line 1236 "ntp_parser.y" /* yacc.c:1646  */
+  case 237:
+#line 1262 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    {
+			attr_val *av;
+
+			av = create_attr_sval((yyvsp[-2].Integer), (yyvsp[-1].String));
+			av->flag = (yyvsp[0].Integer);
+			APPEND_G_FIFO(cfgt.vars, av);
+		}
+#line 3046 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 238:
+#line 1270 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { lex_flush_stack(); }
-#line 2975 "ntp_parser.c" /* yacc.c:1646  */
+#line 3052 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 235:
-#line 1238 "ntp_parser.y" /* yacc.c:1646  */
+  case 239:
+#line 1272 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { /* see drift_parm below for actions */ }
-#line 2981 "ntp_parser.c" /* yacc.c:1646  */
+#line 3058 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 236:
-#line 1240 "ntp_parser.y" /* yacc.c:1646  */
+  case 240:
+#line 1274 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2987 "ntp_parser.c" /* yacc.c:1646  */
+#line 3064 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 237:
-#line 1242 "ntp_parser.y" /* yacc.c:1646  */
+  case 241:
+#line 1276 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2993 "ntp_parser.c" /* yacc.c:1646  */
+#line 3070 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 238:
-#line 1244 "ntp_parser.y" /* yacc.c:1646  */
+  case 242:
+#line 1278 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); }
+#line 3076 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 243:
+#line 1280 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2999 "ntp_parser.c" /* yacc.c:1646  */
+#line 3082 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 239:
-#line 1246 "ntp_parser.y" /* yacc.c:1646  */
+  case 244:
+#line 1282 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			addr_opts_node *aon;
 
@@ -3006,27 +3089,45 @@
 			aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
 			APPEND_G_FIFO(cfgt.trap, aon);
 		}
-#line 3010 "ntp_parser.c" /* yacc.c:1646  */
+#line 3093 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 240:
-#line 1253 "ntp_parser.y" /* yacc.c:1646  */
+  case 245:
+#line 1289 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 3016 "ntp_parser.c" /* yacc.c:1646  */
+#line 3099 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 245:
-#line 1268 "ntp_parser.y" /* yacc.c:1646  */
+  case 250:
+#line 1304 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 #ifndef LEAP_SMEAR
 			yyerror("Built without LEAP_SMEAR support.");
 #endif
 		}
-#line 3026 "ntp_parser.c" /* yacc.c:1646  */
+#line 3109 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
   case 251:
-#line 1288 "ntp_parser.y" /* yacc.c:1646  */
+#line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Integer) = FALSE; }
+#line 3115 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 252:
+#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Integer) = TRUE; }
+#line 3121 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 253:
+#line 1317 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    {  (yyval.Integer) = TRUE; }
+#line 3127 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 258:
+#line 1332 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				attr_val *av;
@@ -3037,11 +3138,11 @@
 				yyerror("driftfile remote configuration ignored");
 			}
 		}
-#line 3041 "ntp_parser.c" /* yacc.c:1646  */
+#line 3142 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 252:
-#line 1299 "ntp_parser.y" /* yacc.c:1646  */
+  case 259:
+#line 1343 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				attr_val *av;
@@ -3058,11 +3159,11 @@
 				yyerror("driftfile remote configuration ignored");
 			}
 		}
-#line 3062 "ntp_parser.c" /* yacc.c:1646  */
+#line 3163 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 253:
-#line 1316 "ntp_parser.y" /* yacc.c:1646  */
+  case 260:
+#line 1360 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if (lex_from_file()) {
 				attr_val *av;
@@ -3072,71 +3173,122 @@
 				yyerror("driftfile remote configuration ignored");
 			}
 		}
-#line 3076 "ntp_parser.c" /* yacc.c:1646  */
+#line 3177 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 254:
-#line 1329 "ntp_parser.y" /* yacc.c:1646  */
+  case 261:
+#line 1373 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val_fifo) = NULL; }
+#line 3183 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 262:
+#line 1375 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); }
+#line 3189 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 263:
+#line 1380 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    {
+			if ((yyvsp[-2].Integer) < 0 || (yyvsp[0].Integer) < 0) {
+				/* bad numbers */
+				yyerror("pollskewlist: skew values must be >=0");
+				destroy_attr_val((yyvsp[-3].Attr_val));
+				(yyvsp[-3].Attr_val) = NULL;
+			} else if ((yyvsp[-3].Attr_val) == NULL) {
+				yyerror("pollskewlist: poll value must be 3-17, inclusive");
+			} else if ((yyvsp[-3].Attr_val)->attr <= 0) {
+				/* process default range */
+				(yyvsp[-3].Attr_val)->value.r.first = (yyvsp[-2].Integer);
+				(yyvsp[-3].Attr_val)->value.r.last  = (yyvsp[0].Integer);
+			} else if ((yyvsp[-2].Integer) < (1 << ((yyvsp[-3].Attr_val)->attr - 1)) && (yyvsp[0].Integer) < (1 << ((yyvsp[-3].Attr_val)->attr - 1))) {
+				(yyvsp[-3].Attr_val)->value.r.first = (yyvsp[-2].Integer);
+				(yyvsp[-3].Attr_val)->value.r.last  = (yyvsp[0].Integer);
+			} else {
+				yyerror("pollskewlist: randomization limit must be <= half the poll interval");
+				destroy_attr_val((yyvsp[-3].Attr_val));
+				(yyvsp[-3].Attr_val) = NULL;
+			}
+			(yyval.Attr_val) = (yyvsp[-3].Attr_val);
+		}
+#line 3216 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 264:
+#line 1405 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; }
+#line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 265:
+#line 1406 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val) = create_attr_rval(-1, 0, 0); }
+#line 3228 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
+    break;
+
+  case 266:
+#line 1412 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 3082 "ntp_parser.c" /* yacc.c:1646  */
+#line 3234 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 256:
-#line 1335 "ntp_parser.y" /* yacc.c:1646  */
+  case 268:
+#line 1418 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = 0; }
-#line 3088 "ntp_parser.c" /* yacc.c:1646  */
+#line 3240 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 257:
-#line 1340 "ntp_parser.y" /* yacc.c:1646  */
+  case 269:
+#line 1423 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val_fifo) = NULL; }
-#line 3094 "ntp_parser.c" /* yacc.c:1646  */
+#line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 258:
-#line 1342 "ntp_parser.y" /* yacc.c:1646  */
+  case 270:
+#line 1425 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 3103 "ntp_parser.c" /* yacc.c:1646  */
+#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 259:
-#line 1350 "ntp_parser.y" /* yacc.c:1646  */
+  case 271:
+#line 1433 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3109 "ntp_parser.c" /* yacc.c:1646  */
+#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 260:
-#line 1352 "ntp_parser.y" /* yacc.c:1646  */
+  case 272:
+#line 1435 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
 			destroy_address_node((yyvsp[0].Address_node));
 		}
-#line 3118 "ntp_parser.c" /* yacc.c:1646  */
+#line 3270 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 261:
-#line 1360 "ntp_parser.y" /* yacc.c:1646  */
+  case 273:
+#line 1443 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 3127 "ntp_parser.c" /* yacc.c:1646  */
+#line 3279 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 262:
-#line 1365 "ntp_parser.y" /* yacc.c:1646  */
+  case 274:
+#line 1448 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 3136 "ntp_parser.c" /* yacc.c:1646  */
+#line 3288 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 263:
-#line 1373 "ntp_parser.y" /* yacc.c:1646  */
+  case 275:
+#line 1456 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			char	prefix;
 			char *	type;
@@ -3158,11 +3310,11 @@
 			(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
 			YYFREE((yyvsp[0].String));
 		}
-#line 3162 "ntp_parser.c" /* yacc.c:1646  */
+#line 3314 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 264:
-#line 1398 "ntp_parser.y" /* yacc.c:1646  */
+  case 276:
+#line 1481 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			nic_rule_node *nrn;
 
@@ -3169,11 +3321,11 @@
 			nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
 			APPEND_G_FIFO(cfgt.nic_rules, nrn);
 		}
-#line 3173 "ntp_parser.c" /* yacc.c:1646  */
+#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 265:
-#line 1405 "ntp_parser.y" /* yacc.c:1646  */
+  case 277:
+#line 1488 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			nic_rule_node *nrn;
 
@@ -3180,119 +3332,119 @@
 			nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
 			APPEND_G_FIFO(cfgt.nic_rules, nrn);
 		}
-#line 3184 "ntp_parser.c" /* yacc.c:1646  */
+#line 3336 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 275:
-#line 1433 "ntp_parser.y" /* yacc.c:1646  */
+  case 287:
+#line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3190 "ntp_parser.c" /* yacc.c:1646  */
+#line 3342 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 276:
-#line 1438 "ntp_parser.y" /* yacc.c:1646  */
+  case 288:
+#line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
 			APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 3199 "ntp_parser.c" /* yacc.c:1646  */
+#line 3351 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 277:
-#line 1443 "ntp_parser.y" /* yacc.c:1646  */
+  case 289:
+#line 1526 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Int_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 3208 "ntp_parser.c" /* yacc.c:1646  */
+#line 3360 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 285:
-#line 1467 "ntp_parser.y" /* yacc.c:1646  */
+  case 297:
+#line 1550 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 3217 "ntp_parser.c" /* yacc.c:1646  */
+#line 3369 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 286:
-#line 1472 "ntp_parser.y" /* yacc.c:1646  */
+  case 298:
+#line 1555 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
 		}
-#line 3226 "ntp_parser.c" /* yacc.c:1646  */
+#line 3378 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 287:
-#line 1480 "ntp_parser.y" /* yacc.c:1646  */
+  case 299:
+#line 1563 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 3235 "ntp_parser.c" /* yacc.c:1646  */
+#line 3387 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 288:
-#line 1485 "ntp_parser.y" /* yacc.c:1646  */
+  case 300:
+#line 1568 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
 		}
-#line 3244 "ntp_parser.c" /* yacc.c:1646  */
+#line 3396 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 289:
-#line 1493 "ntp_parser.y" /* yacc.c:1646  */
+  case 301:
+#line 1576 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3250 "ntp_parser.c" /* yacc.c:1646  */
+#line 3402 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 291:
-#line 1499 "ntp_parser.y" /* yacc.c:1646  */
-    { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3256 "ntp_parser.c" /* yacc.c:1646  */
+  case 303:
+#line 1582 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
+    { (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
+#line 3408 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 292:
-#line 1504 "ntp_parser.y" /* yacc.c:1646  */
+  case 304:
+#line 1587 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.String_fifo) = (yyvsp[-1].String_fifo);
 			APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
 		}
-#line 3265 "ntp_parser.c" /* yacc.c:1646  */
+#line 3417 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 293:
-#line 1509 "ntp_parser.y" /* yacc.c:1646  */
+  case 305:
+#line 1592 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.String_fifo) = NULL;
 			APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
 		}
-#line 3274 "ntp_parser.c" /* yacc.c:1646  */
+#line 3426 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 294:
-#line 1517 "ntp_parser.y" /* yacc.c:1646  */
+  case 306:
+#line 1600 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
 			APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
 		}
-#line 3283 "ntp_parser.c" /* yacc.c:1646  */
+#line 3435 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 295:
-#line 1522 "ntp_parser.y" /* yacc.c:1646  */
+  case 307:
+#line 1605 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Address_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
 		}
-#line 3292 "ntp_parser.c" /* yacc.c:1646  */
+#line 3444 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 296:
-#line 1530 "ntp_parser.y" /* yacc.c:1646  */
+  case 308:
+#line 1613 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
 				yyerror("Integer value is not boolean (0 or 1). Assuming 1");
@@ -3301,35 +3453,35 @@
 				(yyval.Integer) = (yyvsp[0].Integer);
 			}
 		}
-#line 3305 "ntp_parser.c" /* yacc.c:1646  */
+#line 3457 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 297:
-#line 1538 "ntp_parser.y" /* yacc.c:1646  */
+  case 309:
+#line 1621 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = 1; }
-#line 3311 "ntp_parser.c" /* yacc.c:1646  */
+#line 3463 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 298:
-#line 1539 "ntp_parser.y" /* yacc.c:1646  */
+  case 310:
+#line 1622 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = 0; }
-#line 3317 "ntp_parser.c" /* yacc.c:1646  */
+#line 3469 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 299:
-#line 1543 "ntp_parser.y" /* yacc.c:1646  */
+  case 311:
+#line 1626 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3323 "ntp_parser.c" /* yacc.c:1646  */
+#line 3475 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 301:
-#line 1549 "ntp_parser.y" /* yacc.c:1646  */
+  case 313:
+#line 1632 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
-#line 3329 "ntp_parser.c" /* yacc.c:1646  */
+#line 3481 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 302:
-#line 1557 "ntp_parser.y" /* yacc.c:1646  */
+  case 314:
+#line 1640 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			sim_node *sn;
 
@@ -3339,125 +3491,125 @@
 			/* Revert from ; to \n for end-of-command */
 			old_config_style = 1;
 		}
-#line 3343 "ntp_parser.c" /* yacc.c:1646  */
+#line 3495 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 303:
-#line 1574 "ntp_parser.y" /* yacc.c:1646  */
+  case 315:
+#line 1657 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { old_config_style = 0; }
-#line 3349 "ntp_parser.c" /* yacc.c:1646  */
+#line 3501 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 304:
-#line 1579 "ntp_parser.y" /* yacc.c:1646  */
+  case 316:
+#line 1662 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
 		}
-#line 3358 "ntp_parser.c" /* yacc.c:1646  */
+#line 3510 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 305:
-#line 1584 "ntp_parser.y" /* yacc.c:1646  */
+  case 317:
+#line 1667 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
 		}
-#line 3367 "ntp_parser.c" /* yacc.c:1646  */
+#line 3519 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 306:
-#line 1592 "ntp_parser.y" /* yacc.c:1646  */
+  case 318:
+#line 1675 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3373 "ntp_parser.c" /* yacc.c:1646  */
+#line 3525 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 309:
-#line 1602 "ntp_parser.y" /* yacc.c:1646  */
+  case 321:
+#line 1685 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
 			APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
 		}
-#line 3382 "ntp_parser.c" /* yacc.c:1646  */
+#line 3534 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 310:
-#line 1607 "ntp_parser.y" /* yacc.c:1646  */
+  case 322:
+#line 1690 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Sim_server_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
 		}
-#line 3391 "ntp_parser.c" /* yacc.c:1646  */
+#line 3543 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 311:
-#line 1615 "ntp_parser.y" /* yacc.c:1646  */
+  case 323:
+#line 1698 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3397 "ntp_parser.c" /* yacc.c:1646  */
+#line 3549 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 312:
-#line 1620 "ntp_parser.y" /* yacc.c:1646  */
+  case 324:
+#line 1703 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Double) = (yyvsp[-1].Double); }
-#line 3403 "ntp_parser.c" /* yacc.c:1646  */
+#line 3555 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 313:
-#line 1625 "ntp_parser.y" /* yacc.c:1646  */
+  case 325:
+#line 1708 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3409 "ntp_parser.c" /* yacc.c:1646  */
+#line 3561 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 314:
-#line 1630 "ntp_parser.y" /* yacc.c:1646  */
+  case 326:
+#line 1713 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
 			APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
 		}
-#line 3418 "ntp_parser.c" /* yacc.c:1646  */
+#line 3570 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 315:
-#line 1635 "ntp_parser.y" /* yacc.c:1646  */
+  case 327:
+#line 1718 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Sim_script_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
 		}
-#line 3427 "ntp_parser.c" /* yacc.c:1646  */
+#line 3579 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 316:
-#line 1643 "ntp_parser.y" /* yacc.c:1646  */
+  case 328:
+#line 1726 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3433 "ntp_parser.c" /* yacc.c:1646  */
+#line 3585 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 317:
-#line 1648 "ntp_parser.y" /* yacc.c:1646  */
+  case 329:
+#line 1731 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
 		}
-#line 3442 "ntp_parser.c" /* yacc.c:1646  */
+#line 3594 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 318:
-#line 1653 "ntp_parser.y" /* yacc.c:1646  */
+  case 330:
+#line 1736 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     {
 			(yyval.Attr_val_fifo) = NULL;
 			APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
 		}
-#line 3451 "ntp_parser.c" /* yacc.c:1646  */
+#line 3603 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
-  case 319:
-#line 1661 "ntp_parser.y" /* yacc.c:1646  */
+  case 331:
+#line 1744 "../../ntpd/ntp_parser.y" /* yacc.c:1646  */
     { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3457 "ntp_parser.c" /* yacc.c:1646  */
+#line 3609 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
     break;
 
 
-#line 3461 "ntp_parser.c" /* yacc.c:1646  */
+#line 3613 "../../ntpd/ntp_parser.c" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -3685,7 +3837,7 @@
 #endif
   return yyresult;
 }
-#line 1672 "ntp_parser.y" /* yacc.c:1906  */
+#line 1755 "../../ntpd/ntp_parser.y" /* yacc.c:1906  */
 
 
 void
--- contrib/ntp/ntpd/ntp_parser.h.orig
+++ contrib/ntp/ntpd/ntp_parser.h
@@ -30,8 +30,8 @@
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
-#ifndef YY_YY_NTP_PARSER_H_INCLUDED
-# define YY_YY_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
 /* Debug traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG 1
@@ -64,187 +64,196 @@
     T_Burst = 274,
     T_Calibrate = 275,
     T_Ceiling = 276,
-    T_Clockstats = 277,
-    T_Cohort = 278,
-    T_ControlKey = 279,
-    T_Crypto = 280,
-    T_Cryptostats = 281,
-    T_Ctl = 282,
-    T_Day = 283,
-    T_Default = 284,
-    T_Digest = 285,
-    T_Disable = 286,
-    T_Discard = 287,
-    T_Dispersion = 288,
-    T_Double = 289,
-    T_Driftfile = 290,
-    T_Drop = 291,
-    T_Dscp = 292,
-    T_Ellipsis = 293,
-    T_Enable = 294,
-    T_End = 295,
-    T_Epeer = 296,
-    T_False = 297,
-    T_File = 298,
-    T_Filegen = 299,
-    T_Filenum = 300,
-    T_Flag1 = 301,
-    T_Flag2 = 302,
-    T_Flag3 = 303,
-    T_Flag4 = 304,
-    T_Flake = 305,
-    T_Floor = 306,
-    T_Freq = 307,
-    T_Fudge = 308,
-    T_Host = 309,
-    T_Huffpuff = 310,
-    T_Iburst = 311,
-    T_Ident = 312,
-    T_Ignore = 313,
-    T_Incalloc = 314,
-    T_Incmem = 315,
-    T_Initalloc = 316,
-    T_Initmem = 317,
-    T_Includefile = 318,
-    T_Integer = 319,
-    T_Interface = 320,
-    T_Intrange = 321,
-    T_Io = 322,
-    T_Ippeerlimit = 323,
-    T_Ipv4 = 324,
-    T_Ipv4_flag = 325,
-    T_Ipv6 = 326,
-    T_Ipv6_flag = 327,
-    T_Kernel = 328,
-    T_Key = 329,
-    T_Keys = 330,
-    T_Keysdir = 331,
-    T_Kod = 332,
-    T_Mssntp = 333,
-    T_Leapfile = 334,
-    T_Leapsmearinterval = 335,
-    T_Limited = 336,
-    T_Link = 337,
-    T_Listen = 338,
-    T_Logconfig = 339,
-    T_Logfile = 340,
-    T_Loopstats = 341,
-    T_Lowpriotrap = 342,
-    T_Manycastclient = 343,
-    T_Manycastserver = 344,
-    T_Mask = 345,
-    T_Maxage = 346,
-    T_Maxclock = 347,
-    T_Maxdepth = 348,
-    T_Maxdist = 349,
-    T_Maxmem = 350,
-    T_Maxpoll = 351,
-    T_Mdnstries = 352,
-    T_Mem = 353,
-    T_Memlock = 354,
-    T_Minclock = 355,
-    T_Mindepth = 356,
-    T_Mindist = 357,
-    T_Minimum = 358,
-    T_Minpoll = 359,
-    T_Minsane = 360,
-    T_Mode = 361,
-    T_Mode7 = 362,
-    T_Monitor = 363,
-    T_Month = 364,
-    T_Mru = 365,
-    T_Multicastclient = 366,
-    T_Nic = 367,
-    T_Nolink = 368,
-    T_Nomodify = 369,
-    T_Nomrulist = 370,
-    T_None = 371,
-    T_Nonvolatile = 372,
-    T_Noepeer = 373,
-    T_Nopeer = 374,
-    T_Noquery = 375,
-    T_Noselect = 376,
-    T_Noserve = 377,
-    T_Notrap = 378,
-    T_Notrust = 379,
-    T_Ntp = 380,
-    T_Ntpport = 381,
-    T_NtpSignDsocket = 382,
-    T_Orphan = 383,
-    T_Orphanwait = 384,
-    T_PCEdigest = 385,
-    T_Panic = 386,
-    T_Peer = 387,
-    T_Peerstats = 388,
-    T_Phone = 389,
-    T_Pid = 390,
-    T_Pidfile = 391,
-    T_Pool = 392,
-    T_Port = 393,
-    T_Preempt = 394,
-    T_Prefer = 395,
-    T_Protostats = 396,
-    T_Pw = 397,
-    T_Randfile = 398,
-    T_Rawstats = 399,
-    T_Refid = 400,
-    T_Requestkey = 401,
-    T_Reset = 402,
-    T_Restrict = 403,
-    T_Revoke = 404,
-    T_Rlimit = 405,
-    T_Saveconfigdir = 406,
-    T_Server = 407,
-    T_Setvar = 408,
-    T_Source = 409,
-    T_Stacksize = 410,
-    T_Statistics = 411,
-    T_Stats = 412,
-    T_Statsdir = 413,
-    T_Step = 414,
-    T_Stepback = 415,
-    T_Stepfwd = 416,
-    T_Stepout = 417,
-    T_Stratum = 418,
-    T_String = 419,
-    T_Sys = 420,
-    T_Sysstats = 421,
-    T_Tick = 422,
-    T_Time1 = 423,
-    T_Time2 = 424,
-    T_Timer = 425,
-    T_Timingstats = 426,
-    T_Tinker = 427,
-    T_Tos = 428,
-    T_Trap = 429,
-    T_True = 430,
-    T_Trustedkey = 431,
-    T_Ttl = 432,
-    T_Type = 433,
-    T_U_int = 434,
-    T_UEcrypto = 435,
-    T_UEcryptonak = 436,
-    T_UEdigest = 437,
-    T_Unconfig = 438,
-    T_Unpeer = 439,
-    T_Version = 440,
-    T_WanderThreshold = 441,
-    T_Week = 442,
-    T_Wildcard = 443,
-    T_Xleave = 444,
-    T_Year = 445,
-    T_Flag = 446,
-    T_EOC = 447,
-    T_Simulate = 448,
-    T_Beep_Delay = 449,
-    T_Sim_Duration = 450,
-    T_Server_Offset = 451,
-    T_Duration = 452,
-    T_Freq_Offset = 453,
-    T_Wander = 454,
-    T_Jitter = 455,
-    T_Prop_Delay = 456,
-    T_Proc_Delay = 457
+    T_Checkhash = 277,
+    T_Clockstats = 278,
+    T_Cohort = 279,
+    T_ControlKey = 280,
+    T_Crypto = 281,
+    T_Cryptostats = 282,
+    T_Ctl = 283,
+    T_Day = 284,
+    T_Default = 285,
+    T_Digest = 286,
+    T_Disable = 287,
+    T_Discard = 288,
+    T_Dispersion = 289,
+    T_Double = 290,
+    T_Driftfile = 291,
+    T_Drop = 292,
+    T_Dscp = 293,
+    T_Ellipsis = 294,
+    T_Enable = 295,
+    T_End = 296,
+    T_Epeer = 297,
+    T_False = 298,
+    T_File = 299,
+    T_Filegen = 300,
+    T_Filenum = 301,
+    T_Flag1 = 302,
+    T_Flag2 = 303,
+    T_Flag3 = 304,
+    T_Flag4 = 305,
+    T_Flake = 306,
+    T_Floor = 307,
+    T_Freq = 308,
+    T_Fudge = 309,
+    T_Fuzz = 310,
+    T_Host = 311,
+    T_Huffpuff = 312,
+    T_Iburst = 313,
+    T_Ident = 314,
+    T_Ignore = 315,
+    T_Ignorehash = 316,
+    T_Incalloc = 317,
+    T_Incmem = 318,
+    T_Initalloc = 319,
+    T_Initmem = 320,
+    T_Includefile = 321,
+    T_Integer = 322,
+    T_Interface = 323,
+    T_Intrange = 324,
+    T_Io = 325,
+    T_Ippeerlimit = 326,
+    T_Ipv4 = 327,
+    T_Ipv4_flag = 328,
+    T_Ipv6 = 329,
+    T_Ipv6_flag = 330,
+    T_Kernel = 331,
+    T_Key = 332,
+    T_Keys = 333,
+    T_Keysdir = 334,
+    T_Kod = 335,
+    T_Leapfile = 336,
+    T_Leapsmearinterval = 337,
+    T_Limited = 338,
+    T_Link = 339,
+    T_Listen = 340,
+    T_Logconfig = 341,
+    T_Logfile = 342,
+    T_Loopstats = 343,
+    T_Lowpriotrap = 344,
+    T_Manycastclient = 345,
+    T_Manycastserver = 346,
+    T_Mask = 347,
+    T_Maxage = 348,
+    T_Maxclock = 349,
+    T_Maxdepth = 350,
+    T_Maxdist = 351,
+    T_Maxmem = 352,
+    T_Maxpoll = 353,
+    T_Mdnstries = 354,
+    T_Mem = 355,
+    T_Memlock = 356,
+    T_Minclock = 357,
+    T_Mindepth = 358,
+    T_Mindist = 359,
+    T_Minimum = 360,
+    T_Minjitter = 361,
+    T_Minpoll = 362,
+    T_Minsane = 363,
+    T_Mode = 364,
+    T_Mode7 = 365,
+    T_Monitor = 366,
+    T_Month = 367,
+    T_Mru = 368,
+    T_Mssntp = 369,
+    T_Multicastclient = 370,
+    T_Nic = 371,
+    T_Nolink = 372,
+    T_Nomodify = 373,
+    T_Nomrulist = 374,
+    T_None = 375,
+    T_Nonvolatile = 376,
+    T_Noepeer = 377,
+    T_Nopeer = 378,
+    T_Noquery = 379,
+    T_Noselect = 380,
+    T_Noserve = 381,
+    T_Notrap = 382,
+    T_Notrust = 383,
+    T_Ntp = 384,
+    T_Ntpport = 385,
+    T_NtpSignDsocket = 386,
+    T_Orphan = 387,
+    T_Orphanwait = 388,
+    T_PCEdigest = 389,
+    T_Panic = 390,
+    T_Peer = 391,
+    T_Peerstats = 392,
+    T_Phone = 393,
+    T_Pid = 394,
+    T_Pidfile = 395,
+    T_Poll = 396,
+    T_PollSkewList = 397,
+    T_Pool = 398,
+    T_Port = 399,
+    T_Preempt = 400,
+    T_Prefer = 401,
+    T_Protostats = 402,
+    T_Pw = 403,
+    T_Randfile = 404,
+    T_Rawstats = 405,
+    T_Refid = 406,
+    T_Requestkey = 407,
+    T_Reset = 408,
+    T_Restrict = 409,
+    T_Revoke = 410,
+    T_Rlimit = 411,
+    T_Saveconfigdir = 412,
+    T_Server = 413,
+    T_Serverresponse = 414,
+    T_ServerresponseFuzz = 415,
+    T_Setvar = 416,
+    T_Source = 417,
+    T_Stacksize = 418,
+    T_Statistics = 419,
+    T_Stats = 420,
+    T_Statsdir = 421,
+    T_Step = 422,
+    T_Stepback = 423,
+    T_Stepfwd = 424,
+    T_Stepout = 425,
+    T_Stratum = 426,
+    T_String = 427,
+    T_Sys = 428,
+    T_Sysstats = 429,
+    T_Tick = 430,
+    T_Time1 = 431,
+    T_Time2 = 432,
+    T_Timer = 433,
+    T_Timingstats = 434,
+    T_Tinker = 435,
+    T_Tos = 436,
+    T_Trap = 437,
+    T_True = 438,
+    T_Trustedkey = 439,
+    T_Ttl = 440,
+    T_Type = 441,
+    T_U_int = 442,
+    T_UEcrypto = 443,
+    T_UEcryptonak = 444,
+    T_UEdigest = 445,
+    T_Unconfig = 446,
+    T_Unpeer = 447,
+    T_Version = 448,
+    T_WanderThreshold = 449,
+    T_Week = 450,
+    T_Wildcard = 451,
+    T_Xleave = 452,
+    T_Xmtnonce = 453,
+    T_Year = 454,
+    T_Flag = 455,
+    T_EOC = 456,
+    T_Simulate = 457,
+    T_Beep_Delay = 458,
+    T_Sim_Duration = 459,
+    T_Server_Offset = 460,
+    T_Duration = 461,
+    T_Freq_Offset = 462,
+    T_Wander = 463,
+    T_Jitter = 464,
+    T_Prop_Delay = 465,
+    T_Proc_Delay = 466
   };
 #endif
 /* Tokens.  */
@@ -267,187 +276,196 @@
 #define T_Burst 274
 #define T_Calibrate 275
 #define T_Ceiling 276
-#define T_Clockstats 277
-#define T_Cohort 278
-#define T_ControlKey 279
-#define T_Crypto 280
-#define T_Cryptostats 281
-#define T_Ctl 282
-#define T_Day 283
-#define T_Default 284
-#define T_Digest 285
-#define T_Disable 286
-#define T_Discard 287
-#define T_Dispersion 288
-#define T_Double 289
-#define T_Driftfile 290
-#define T_Drop 291
-#define T_Dscp 292
-#define T_Ellipsis 293
-#define T_Enable 294
-#define T_End 295
-#define T_Epeer 296
-#define T_False 297
-#define T_File 298
-#define T_Filegen 299
-#define T_Filenum 300
-#define T_Flag1 301
-#define T_Flag2 302
-#define T_Flag3 303
-#define T_Flag4 304
-#define T_Flake 305
-#define T_Floor 306
-#define T_Freq 307
-#define T_Fudge 308
-#define T_Host 309
-#define T_Huffpuff 310
-#define T_Iburst 311
-#define T_Ident 312
-#define T_Ignore 313
-#define T_Incalloc 314
-#define T_Incmem 315
-#define T_Initalloc 316
-#define T_Initmem 317
-#define T_Includefile 318
-#define T_Integer 319
-#define T_Interface 320
-#define T_Intrange 321
-#define T_Io 322
-#define T_Ippeerlimit 323
-#define T_Ipv4 324
-#define T_Ipv4_flag 325
-#define T_Ipv6 326
-#define T_Ipv6_flag 327
-#define T_Kernel 328
-#define T_Key 329
-#define T_Keys 330
-#define T_Keysdir 331
-#define T_Kod 332
-#define T_Mssntp 333
-#define T_Leapfile 334
-#define T_Leapsmearinterval 335
-#define T_Limited 336
-#define T_Link 337
-#define T_Listen 338
-#define T_Logconfig 339
-#define T_Logfile 340
-#define T_Loopstats 341
-#define T_Lowpriotrap 342
-#define T_Manycastclient 343
-#define T_Manycastserver 344
-#define T_Mask 345
-#define T_Maxage 346
-#define T_Maxclock 347
-#define T_Maxdepth 348
-#define T_Maxdist 349
-#define T_Maxmem 350
-#define T_Maxpoll 351
-#define T_Mdnstries 352
-#define T_Mem 353
-#define T_Memlock 354
-#define T_Minclock 355
-#define T_Mindepth 356
-#define T_Mindist 357
-#define T_Minimum 358
-#define T_Minpoll 359
-#define T_Minsane 360
-#define T_Mode 361
-#define T_Mode7 362
-#define T_Monitor 363
-#define T_Month 364
-#define T_Mru 365
-#define T_Multicastclient 366
-#define T_Nic 367
-#define T_Nolink 368
-#define T_Nomodify 369
-#define T_Nomrulist 370
-#define T_None 371
-#define T_Nonvolatile 372
-#define T_Noepeer 373
-#define T_Nopeer 374
-#define T_Noquery 375
-#define T_Noselect 376
-#define T_Noserve 377
-#define T_Notrap 378
-#define T_Notrust 379
-#define T_Ntp 380
-#define T_Ntpport 381
-#define T_NtpSignDsocket 382
-#define T_Orphan 383
-#define T_Orphanwait 384
-#define T_PCEdigest 385
-#define T_Panic 386
-#define T_Peer 387
-#define T_Peerstats 388
-#define T_Phone 389
-#define T_Pid 390
-#define T_Pidfile 391
-#define T_Pool 392
-#define T_Port 393
-#define T_Preempt 394
-#define T_Prefer 395
-#define T_Protostats 396
-#define T_Pw 397
-#define T_Randfile 398
-#define T_Rawstats 399
-#define T_Refid 400
-#define T_Requestkey 401
-#define T_Reset 402
-#define T_Restrict 403
-#define T_Revoke 404
-#define T_Rlimit 405
-#define T_Saveconfigdir 406
-#define T_Server 407
-#define T_Setvar 408
-#define T_Source 409
-#define T_Stacksize 410
-#define T_Statistics 411
-#define T_Stats 412
-#define T_Statsdir 413
-#define T_Step 414
-#define T_Stepback 415
-#define T_Stepfwd 416
-#define T_Stepout 417
-#define T_Stratum 418
-#define T_String 419
-#define T_Sys 420
-#define T_Sysstats 421
-#define T_Tick 422
-#define T_Time1 423
-#define T_Time2 424
-#define T_Timer 425
-#define T_Timingstats 426
-#define T_Tinker 427
-#define T_Tos 428
-#define T_Trap 429
-#define T_True 430
-#define T_Trustedkey 431
-#define T_Ttl 432
-#define T_Type 433
-#define T_U_int 434
-#define T_UEcrypto 435
-#define T_UEcryptonak 436
-#define T_UEdigest 437
-#define T_Unconfig 438
-#define T_Unpeer 439
-#define T_Version 440
-#define T_WanderThreshold 441
-#define T_Week 442
-#define T_Wildcard 443
-#define T_Xleave 444
-#define T_Year 445
-#define T_Flag 446
-#define T_EOC 447
-#define T_Simulate 448
-#define T_Beep_Delay 449
-#define T_Sim_Duration 450
-#define T_Server_Offset 451
-#define T_Duration 452
-#define T_Freq_Offset 453
-#define T_Wander 454
-#define T_Jitter 455
-#define T_Prop_Delay 456
-#define T_Proc_Delay 457
+#define T_Checkhash 277
+#define T_Clockstats 278
+#define T_Cohort 279
+#define T_ControlKey 280
+#define T_Crypto 281
+#define T_Cryptostats 282
+#define T_Ctl 283
+#define T_Day 284
+#define T_Default 285
+#define T_Digest 286
+#define T_Disable 287
+#define T_Discard 288
+#define T_Dispersion 289
+#define T_Double 290
+#define T_Driftfile 291
+#define T_Drop 292
+#define T_Dscp 293
+#define T_Ellipsis 294
+#define T_Enable 295
+#define T_End 296
+#define T_Epeer 297
+#define T_False 298
+#define T_File 299
+#define T_Filegen 300
+#define T_Filenum 301
+#define T_Flag1 302
+#define T_Flag2 303
+#define T_Flag3 304
+#define T_Flag4 305
+#define T_Flake 306
+#define T_Floor 307
+#define T_Freq 308
+#define T_Fudge 309
+#define T_Fuzz 310
+#define T_Host 311
+#define T_Huffpuff 312
+#define T_Iburst 313
+#define T_Ident 314
+#define T_Ignore 315
+#define T_Ignorehash 316
+#define T_Incalloc 317
+#define T_Incmem 318
+#define T_Initalloc 319
+#define T_Initmem 320
+#define T_Includefile 321
+#define T_Integer 322
+#define T_Interface 323
+#define T_Intrange 324
+#define T_Io 325
+#define T_Ippeerlimit 326
+#define T_Ipv4 327
+#define T_Ipv4_flag 328
+#define T_Ipv6 329
+#define T_Ipv6_flag 330
+#define T_Kernel 331
+#define T_Key 332
+#define T_Keys 333
+#define T_Keysdir 334
+#define T_Kod 335
+#define T_Leapfile 336
+#define T_Leapsmearinterval 337
+#define T_Limited 338
+#define T_Link 339
+#define T_Listen 340
+#define T_Logconfig 341
+#define T_Logfile 342
+#define T_Loopstats 343
+#define T_Lowpriotrap 344
+#define T_Manycastclient 345
+#define T_Manycastserver 346
+#define T_Mask 347
+#define T_Maxage 348
+#define T_Maxclock 349
+#define T_Maxdepth 350
+#define T_Maxdist 351
+#define T_Maxmem 352
+#define T_Maxpoll 353
+#define T_Mdnstries 354
+#define T_Mem 355
+#define T_Memlock 356
+#define T_Minclock 357
+#define T_Mindepth 358
+#define T_Mindist 359
+#define T_Minimum 360
+#define T_Minjitter 361
+#define T_Minpoll 362
+#define T_Minsane 363
+#define T_Mode 364
+#define T_Mode7 365
+#define T_Monitor 366
+#define T_Month 367
+#define T_Mru 368
+#define T_Mssntp 369
+#define T_Multicastclient 370
+#define T_Nic 371
+#define T_Nolink 372
+#define T_Nomodify 373
+#define T_Nomrulist 374
+#define T_None 375
+#define T_Nonvolatile 376
+#define T_Noepeer 377
+#define T_Nopeer 378
+#define T_Noquery 379
+#define T_Noselect 380
+#define T_Noserve 381
+#define T_Notrap 382
+#define T_Notrust 383
+#define T_Ntp 384
+#define T_Ntpport 385
+#define T_NtpSignDsocket 386
+#define T_Orphan 387
+#define T_Orphanwait 388
+#define T_PCEdigest 389
+#define T_Panic 390
+#define T_Peer 391
+#define T_Peerstats 392
+#define T_Phone 393
+#define T_Pid 394
+#define T_Pidfile 395
+#define T_Poll 396
+#define T_PollSkewList 397
+#define T_Pool 398
+#define T_Port 399
+#define T_Preempt 400
+#define T_Prefer 401
+#define T_Protostats 402
+#define T_Pw 403
+#define T_Randfile 404
+#define T_Rawstats 405
+#define T_Refid 406
+#define T_Requestkey 407
+#define T_Reset 408
+#define T_Restrict 409
+#define T_Revoke 410
+#define T_Rlimit 411
+#define T_Saveconfigdir 412
+#define T_Server 413
+#define T_Serverresponse 414
+#define T_ServerresponseFuzz 415
+#define T_Setvar 416
+#define T_Source 417
+#define T_Stacksize 418
+#define T_Statistics 419
+#define T_Stats 420
+#define T_Statsdir 421
+#define T_Step 422
+#define T_Stepback 423
+#define T_Stepfwd 424
+#define T_Stepout 425
+#define T_Stratum 426
+#define T_String 427
+#define T_Sys 428
+#define T_Sysstats 429
+#define T_Tick 430
+#define T_Time1 431
+#define T_Time2 432
+#define T_Timer 433
+#define T_Timingstats 434
+#define T_Tinker 435
+#define T_Tos 436
+#define T_Trap 437
+#define T_True 438
+#define T_Trustedkey 439
+#define T_Ttl 440
+#define T_Type 441
+#define T_U_int 442
+#define T_UEcrypto 443
+#define T_UEcryptonak 444
+#define T_UEdigest 445
+#define T_Unconfig 446
+#define T_Unpeer 447
+#define T_Version 448
+#define T_WanderThreshold 449
+#define T_Week 450
+#define T_Wildcard 451
+#define T_Xleave 452
+#define T_Xmtnonce 453
+#define T_Year 454
+#define T_Flag 455
+#define T_EOC 456
+#define T_Simulate 457
+#define T_Beep_Delay 458
+#define T_Sim_Duration 459
+#define T_Server_Offset 460
+#define T_Duration 461
+#define T_Freq_Offset 462
+#define T_Wander 463
+#define T_Jitter 464
+#define T_Prop_Delay 465
+#define T_Proc_Delay 466
 
 /* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -454,7 +472,7 @@
 
 union YYSTYPE
 {
-#line 52 "ntp_parser.y" /* yacc.c:1909  */
+#line 52 "../../ntpd/ntp_parser.y" /* yacc.c:1909  */
 
 	char *			String;
 	double			Double;
@@ -473,7 +491,7 @@
 	script_info *		Sim_script;
 	script_info_fifo *	Sim_script_fifo;
 
-#line 477 "ntp_parser.h" /* yacc.c:1909  */
+#line 495 "../../ntpd/ntp_parser.h" /* yacc.c:1909  */
 };
 
 typedef union YYSTYPE YYSTYPE;
@@ -486,4 +504,4 @@
 
 int yyparse (void);
 
-#endif /* !YY_YY_NTP_PARSER_H_INCLUDED  */
+#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED  */
--- contrib/ntp/ntpd/ntp_peer.c.orig
+++ contrib/ntp/ntpd/ntp_peer.c
@@ -844,11 +844,13 @@
 		return NULL;
 	}
 
+#if 0
 DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
 		(hostname)
 		    ? hostname
 		    : stoa(srcadr),
 		ip_count));
+#endif
 
 	/* Check ippeerlimit wrt ip_count */
 	if (ippeerlimit > -1) {
--- contrib/ntp/ntpd/ntp_proto.c.orig
+++ contrib/ntp/ntpd/ntp_proto.c
@@ -15,6 +15,7 @@
 #include "ntp_control.h"
 #include "ntp_string.h"
 #include "ntp_leapsec.h"
+#include "ntp_psl.h"
 #include "refidsmear.h"
 #include "lib_strbuf.h"
 
@@ -31,6 +32,13 @@
 # define BDELAY_DEFAULT (-0.050)
 #endif
 
+#define SRVFUZ_SHIFT	6	/* 64 seconds */
+#define SRVRSP_FUZZ(x)					\
+	do {						\
+		x.l_uf &= 0;				\
+		x.l_ui &= ~((1 << SRVFUZ_SHIFT) - 1U);	\
+	} while(0)
+
 /*
  * This macro defines the authentication state. If x is 1 authentication
  * is required; otherwise it is optional.
@@ -79,6 +87,11 @@
 #define	POOL_SOLICIT_WINDOW	8
 
 /*
+ * flag bits propagated from pool to individual peers
+ */
+#define POOL_FLAG_PMASK		(FLAG_IBURST | FLAG_NOSELECT)
+
+/*
  * peer_select groups statistics for a peer used by clock_select() and
  * clock_cluster().
  */
@@ -97,10 +110,16 @@
 u_char	xmt_leap;		/* leap indicator sent in client requests, set up by set_sys_leap() */
 u_char	sys_stratum;		/* system stratum */
 s_char	sys_precision;		/* local clock precision (log2 s) */
-double	sys_rootdelay;		/* roundtrip delay to primary source */
-double	sys_rootdisp;		/* dispersion to primary source */
+double	sys_rootdelay;		/* roundtrip delay to root (primary source) */
+double	sys_rootdisp;		/* dispersion to root (primary source) */
+double	prev_rootdisp;		/* previous root dispersion */
+double	p2_rootdisp;		/* previous previous root dispersion */
 u_int32 sys_refid;		/* reference id (network byte order) */
 l_fp	sys_reftime;		/* last update time */
+l_fp	prev_reftime;		/* previous sys_reftime */
+l_fp	p2_reftime;		/* previous previous sys_reftime */
+u_long	prev_time;		/* "current_time" when saved prev_time */
+u_long	p2_time;		/* previous prev_time */
 struct	peer *sys_peer;		/* current peer */
 
 #ifdef LEAP_SMEAR
@@ -337,11 +356,18 @@
 	/*
 	 * The ORIGIN must match, or this cannot be a valid NAK, either.
 	 */
+
+	if (FLAG_LOOPNONCE & peer->flags) {
+		myorg = &peer->nonce;
+	} else {
+		if (peer->flip > 0) {
+			myorg = &peer->borg;
+		} else {
+			myorg = &peer->aorg;
+		}
+	}
+
 	NTOHL_FP(&rpkt->org, &p_org);
-	if (peer->flip > 0)
-		myorg = &peer->borg;
-	else
-		myorg = &peer->aorg;
 
 	if (L_ISZERO(&p_org) ||
 	    L_ISZERO( myorg) ||
@@ -387,7 +413,7 @@
 	 */
 	if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
 		peer->outdate = current_time;
-		poll_update(peer, hpoll);
+		poll_update(peer, hpoll, 0);
 		if (sys_leap != LEAP_NOTINSYNC)
 			peer_xmit(peer);
 		return;
@@ -408,7 +434,7 @@
 	 */
 	if (peer->cast_flags & MDF_ACAST) {
 		peer->outdate = current_time;
-		poll_update(peer, hpoll);
+		poll_update(peer, hpoll, 0);
 		if (peer->unreach > sys_beacon) {
 			peer->unreach = 0;
 			peer->ttl = 0;
@@ -437,7 +463,7 @@
 	 */
 	if (peer->cast_flags & MDF_POOL) {
 		peer->outdate = current_time;
-		poll_update(peer, hpoll);
+		poll_update(peer, hpoll, 0);
 		if (   (peer_associations <= 2 * sys_maxclock)
 		    && (   peer_associations < sys_maxclock
 			|| sys_survivors < sys_minclock))
@@ -549,7 +575,7 @@
 	/*
 	 * Do not transmit if in broadcast client mode.
 	 */
-	poll_update(peer, hpoll);
+	poll_update(peer, hpoll, (peer->hmode == MODE_CLIENT));
 	if (peer->hmode != MODE_BCLIENT)
 		peer_xmit(peer);
 
@@ -640,12 +666,13 @@
 	 */
 	/*
 	 * Bogus port check is before anything, since it probably
-	 * reveals a clogging attack.
+	 * reveals a clogging attack. Likewise the mimimum packet size
+	 * of 2 bytes (for mode 6/7) must be checked first.
 	 */
 	sys_received++;
-	if (0 == SRCPORT(&rbufp->recv_srcadr)) {
+	if (0 == SRCPORT(&rbufp->recv_srcadr) || rbufp->recv_length < 2) {
 		sys_badlength++;
-		return;				/* bogus port */
+		return;				/* bogus port / length */
 	}
 	restrictions(&rbufp->recv_srcadr, &r4a);
 	restrict_mask = r4a.rflags;
@@ -652,20 +679,8 @@
 
 	pkt = &rbufp->recv_pkt;
 	hisversion = PKT_VERSION(pkt->li_vn_mode);
-	hisleap = PKT_LEAP(pkt->li_vn_mode);
 	hismode = (int)PKT_MODE(pkt->li_vn_mode);
-	hisstratum = PKT_TO_STRATUM(pkt->stratum);
-	DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s restrict %s org %#010x.%08x xmt %#010x.%08x\n",
-		    current_time, stoa(&rbufp->dstadr->sin),
-		    stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
-		    build_iflags(rbufp->dstadr->flags),
-		    build_rflags(restrict_mask),
-		    ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
-		    ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
 
-	/* See basic mode and broadcast checks, below */
-	INSIST(0 != hisstratum);
-
 	if (restrict_mask & RES_IGNORE) {
 		DPRINTF(2, ("receive: drop: RES_IGNORE\n"));
 		sys_restricted++;
@@ -696,6 +711,30 @@
 		return;				/* no time serve */
 	}
 
+
+	/* If we arrive here, we should have a standard NTP packet. We
+	 * check that the minimum size is available and fetch some more
+	 * items from the packet once we can be sure they are indeed
+	 * there.
+	 */
+	if (rbufp->recv_length < LEN_PKT_NOMAC) {
+		sys_badlength++;
+		return;				/* bogus length */
+	}
+	
+	hisleap = PKT_LEAP(pkt->li_vn_mode);
+	hisstratum = PKT_TO_STRATUM(pkt->stratum);
+	INSIST(0 != hisstratum); /* paranoia check PKT_TO_STRATUM result */
+
+	DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s "
+		    "restrict %s org %#010x.%08x xmt %#010x.%08x\n",
+		    current_time, stoa(&rbufp->dstadr->sin),
+		    stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
+		    build_iflags(rbufp->dstadr->flags),
+		    build_rflags(restrict_mask),
+		    ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
+		    ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
+
 	/*
 	 * This is for testing. If restricted drop ten percent of
 	 * surviving packets.
@@ -888,12 +927,13 @@
 			}
 			return;			/* rate exceeded */
 		}
-		if (hismode == MODE_CLIENT)
+		if (hismode == MODE_CLIENT) {
 			fast_xmit(rbufp, MODE_SERVER, skeyid,
 			    restrict_mask);
-		else
+		} else {
 			fast_xmit(rbufp, MODE_ACTIVE, skeyid,
 			    restrict_mask);
+		}
 		return;				/* rate exceeded */
 	}
 	restrict_mask &= ~RES_KOD;
@@ -1250,9 +1290,11 @@
 
 			if (AUTH(restrict_mask & RES_DONTTRUST,
 			   is_authentic)) {
+				/* Bug 3596: Do we want to fuzz the reftime? */
 				fast_xmit(rbufp, MODE_SERVER, skeyid,
 				    restrict_mask);
 			} else if (is_authentic == AUTH_ERROR) {
+				/* Bug 3596: Do we want to fuzz the reftime? */
 				fast_xmit(rbufp, MODE_SERVER, 0,
 				    restrict_mask);
 				sys_badauth++;
@@ -1318,6 +1360,7 @@
 			    pkt->refid,
 			    rbufp->recv_length - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
 
+			/* Bug 3596: Do we want to fuzz the reftime? */
 			fast_xmit(rbufp, MODE_SERVER, skeyid,
 			    restrict_mask);
 		}
@@ -1386,8 +1429,8 @@
 		peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr,
 			       r4a.ippeerlimit, MODE_CLIENT, hisversion,
 			       peer2->minpoll, peer2->maxpoll,
-			       FLAG_PREEMPT | (FLAG_IBURST & peer2->flags),
-			       MDF_UCAST | MDF_UCLNT, 0, skeyid, sys_ident);
+			       (FLAG_PREEMPT | (POOL_FLAG_PMASK & peer2->flags)),
+			       (MDF_UCAST | MDF_UCLNT), 0, skeyid, sys_ident);
 		if (NULL == peer) {
 			DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n"));
 			sys_declined++;
@@ -1858,7 +1901,9 @@
 	 * packet is a replay. This prevents the bad guys from replaying
 	 * the most recent packet, authenticated or not.
 	 */
-	} else if (L_ISEQU(&peer->xmt, &p_xmt)) {
+	} else if (   ((FLAG_LOOPNONCE & peer->flags) && L_ISEQU(&peer->nonce, &p_xmt))
+		   || (!(FLAG_LOOPNONCE & peer->flags) && L_ISEQU(&peer->xmt, &p_xmt))
+	) {
 		DPRINTF(2, ("receive: drop: Duplicate xmit\n"));
 		peer->flash |= TEST1;			/* duplicate */
 		peer->oldpkt++;
@@ -1958,6 +2003,10 @@
 	 * We have earlier asserted that hisstratum cannot be 0.
 	 * If hisstratum is STRATUM_UNSPEC, it means he's not sync'd.
 	 */
+
+	/* XXX: FLAG_LOOPNONCE */
+	DEBUG_INSIST(0 == (FLAG_LOOPNONCE & peer->flags));
+
 	} else if (peer->flip == 0) {
 		if (0) {
 		} else if (L_ISZERO(&p_org)) {
@@ -1967,6 +2016,7 @@
 			msyslog(LOG_INFO,
 				"receive: BUG 3361: Clearing peer->aorg ");
 			L_CLR(&peer->aorg);
+			/* Clear peer->nonce, too? */
 #endif
 			/**/
 			switch (hismode) {
@@ -2020,6 +2070,7 @@
 			}
 		} else {
 			L_CLR(&peer->aorg);
+			/* XXX: FLAG_LOOPNONCE */
 		}
 
 	/*
@@ -2193,7 +2244,7 @@
 			peer->minpoll = peer->ppoll;
 		peer->burst = peer->retry = 0;
 		peer->throttle = (NTP_SHIFT + 1) * (1 << peer->minpoll);
-		poll_update(peer, pkt->ppoll);
+		poll_update(peer, pkt->ppoll, 0);
 		return;				/* kiss-o'-death */
 	}
 	if (kissCode != NOKISS) {
@@ -2383,10 +2434,18 @@
 	/*
 	 * The dance is complete and the flash bits have been lit. Toss
 	 * the packet over the fence for processing, which may light up
-	 * more flashers.
+	 * more flashers. Leave if the packet is not good.
 	 */
 	process_packet(peer, pkt, rbufp->recv_length);
+	if (peer->flash & PKT_TEST_MASK)
+		return;
 
+	/* [bug 3592] Update poll. Ideally this should not happen in a
+	 * receive branch, but too much is going on here... at least we
+	 * do it only if the packet was good!
+	 */	
+	poll_update(peer, peer->hpoll, (peer->hmode == MODE_CLIENT));
+
 	/*
 	 * In interleaved mode update the state variables. Also adjust the
 	 * transmit phase to avoid crossover.
@@ -2465,7 +2524,10 @@
 		peer->seldisptoolarge++;
 		DPRINTF(1, ("packet: flash header %04x\n",
 			    peer->flash));
-		poll_update(peer, peer->hpoll);	/* ppoll updated? */
+
+		/* ppoll updated? */
+		/* XXX: Fuzz the poll? */
+		poll_update(peer, peer->hpoll, (peer->hmode == MODE_CLIENT));
 		return;
 	}
 
@@ -2509,7 +2571,7 @@
 		if (peer->burst > 0)
 			peer->nextdate = current_time;
 	}
-	poll_update(peer, peer->hpoll);
+	poll_update(peer, peer->hpoll, (peer->hmode == MODE_CLIENT));
 
 	/**/
 
@@ -2776,7 +2838,7 @@
 		sys_poll = peer->minpoll;
 	if (sys_poll > peer->maxpoll)
 		sys_poll = peer->maxpoll;
-	poll_update(peer, sys_poll);
+	poll_update(peer, sys_poll, 0);
 	sys_stratum = min(peer->stratum + 1, STRATUM_UNSPEC);
 	if (   peer->stratum == STRATUM_REFCLOCK
 	    || peer->stratum == STRATUM_UNSPEC)
@@ -2807,11 +2869,21 @@
 		+ clock_phi * (current_time - peer->update)
 		+ fabs(sys_offset);
 
+	p2_rootdisp = prev_rootdisp;
+	prev_rootdisp = sys_rootdisp;
 	if (dtemp > sys_mindisp)
 		sys_rootdisp = dtemp;
 	else
 		sys_rootdisp = sys_mindisp;
+
 	sys_rootdelay = peer->delay + peer->rootdelay;
+
+	p2_reftime = prev_reftime;
+	p2_time = prev_time;
+
+	prev_reftime = sys_reftime;
+	prev_time = current_time + 64 + (rand() & 0x3f);	/* 64-127 s */
+
 	sys_reftime = peer->dst;
 
 	DPRINTF(1, ("clock_update: at %lu sample %lu associd %d\n",
@@ -2856,7 +2928,11 @@
 		sys_stratum = STRATUM_UNSPEC;
 		memcpy(&sys_refid, "STEP", 4);
 		sys_rootdelay = 0;
+		p2_rootdisp = 0;
+		prev_rootdisp = 0;
 		sys_rootdisp = 0;
+		L_CLR(&p2_reftime);	/* Should we clear p2_reftime? */
+		L_CLR(&prev_reftime);	/* Should we clear prev_reftime? */
 		L_CLR(&sys_reftime);
 		sys_jitter = LOGTOD(sys_precision);
 		leapsec_reset_frame();
@@ -2883,9 +2959,10 @@
 			 * first clock sync, send them home satisfied.
 			 */
 #ifdef HAVE_WORKING_FORK
-			if (waitsync_fd_to_close != -1) {
-				close(waitsync_fd_to_close);
-				waitsync_fd_to_close = -1;
+			if (daemon_pipe[1] != -1) {
+				write(daemon_pipe[1], "S\n", 2);
+				close(daemon_pipe[1]);
+				daemon_pipe[1] = -1;
 				DPRINTF(1, ("notified parent --wait-sync is done\n"));
 			}
 #endif /* HAVE_WORKING_FORK */
@@ -2930,10 +3007,11 @@
 void
 poll_update(
 	struct peer *peer,	/* peer structure pointer */
-	u_char	mpoll
+	u_char	mpoll,
+	u_char  skewpoll
 	)
 {
-	u_long	next, utemp;
+	u_long	next, utemp, limit;
 	u_char	hpoll;
 
 	/*
@@ -2977,6 +3055,15 @@
 	 */
 	utemp = current_time + max(peer->throttle - (NTP_SHIFT - 1) *
 	    (1 << peer->minpoll), ntp_minpkt);
+
+ 	/*[Bug 3592] avoid unlimited postpone of next poll */
+	limit = (2u << hpoll);
+	if (limit > 64)
+		limit -= (limit >> 2);
+	limit += peer->outdate;
+	if (limit < current_time)
+		limit = current_time;
+
 	if (peer->burst > 0) {
 		if (peer->nextdate > current_time)
 			return;
@@ -3022,6 +3109,29 @@
 			next = ((0x1000UL | (ntp_random() & 0x0ff)) <<
 			    hpoll) >> 12;
 		next += peer->outdate;
+		/* XXX: bug3596: Deal with poll skew list? */
+		if (skewpoll) {
+			psl_item psi;
+
+			if (0 == get_pollskew(hpoll, &psi)) {
+				int sub = psi.sub;
+				int qty = psi.qty;
+				int msk = psi.msk;
+				int val;
+
+				if (   0 != sub
+				    || 0 != qty) {
+				    	do {
+						val = ntp_random() & msk;
+					} while (val > qty);
+
+					next -= sub;
+					next += val;
+				}
+			} else {
+				/* get_pollskew() already logged this */
+			}
+		}
 		if (next > utemp)
 			peer->nextdate = next;
 		else
@@ -3029,6 +3139,13 @@
 		if (peer->throttle > (1 << peer->minpoll))
 			peer->nextdate += ntp_minpkt;
 	}
+
+ 	/*[Bug 3592] avoid unlimited postpone of next poll */
+	if (peer->nextdate > limit) {
+		DPRINTF(1, ("poll_update: clamp reached; limit %lu next %lu\n",
+			    limit, peer->nextdate));
+		peer->nextdate = limit;
+	}
 	DPRINTF(2, ("poll_update: at %lu %s poll %d burst %d retry %d head %d early %lu next %lu\n",
 		    current_time, ntoa(&peer->srcadr), peer->hpoll,
 		    peer->burst, peer->retry, peer->throttle,
@@ -3953,6 +4070,7 @@
 	xpkt.refid = sys_refid;
 	xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
 	xpkt.rootdisp =  HTONS_FP(DTOUFP(sys_rootdisp));
+	/* Use sys_reftime for peer exchanges */
 	HTONL_FP(&sys_reftime, &xpkt.reftime);
 	HTONL_FP(&peer->rec, &xpkt.org);
 	HTONL_FP(&peer->dst, &xpkt.rec);
@@ -4377,7 +4495,7 @@
 static void
 fast_xmit(
 	struct recvbuf *rbufp,	/* receive packet pointer */
-	int	xmode,		/* receive mode */
+	int	xmode,		/* receive mode */  /* XXX: HMS: really? */
 	keyid_t	xkeyid,		/* transmit key ID */
 	int	flags		/* restrict mask */
 	)
@@ -4408,8 +4526,8 @@
 	/*
 	 * If this is a kiss-o'-death (KoD) packet, show leap
 	 * unsynchronized, stratum zero, reference ID the four-character
-	 * kiss code and system root delay. Note we don't reveal the
-	 * local time, so these packets can't be used for
+	 * kiss code and (???) system root delay. Note we don't reveal
+	 * the local time, so these packets can't be used for
 	 * synchronization.
 	 */
 	if (flags & RES_KOD) {
@@ -4431,18 +4549,23 @@
 	 * This is a normal packet. Use the system variables.
 	 */
 	} else {
+		double this_rootdisp;
+		l_fp this_ref_time;
+
 #ifdef LEAP_SMEAR
 		/*
 		 * Make copies of the variables which can be affected by smearing.
 		 */
-		l_fp this_ref_time;
 		l_fp this_recv_time;
 #endif
 
 		/*
-		 * If we are inside the leap smear interval we add the current smear offset to
-		 * the packet receive time, to the packet transmit time, and eventually to the
-		 * reftime to make sure the reftime isn't later than the transmit/receive times.
+		 * If we are inside the leap smear interval we add
+		 * the current smear offset to:
+		 * - the packet receive time,
+		 * - the packet transmit time,
+		 * - and eventually to the reftime to make sure the
+		 *   reftime isn't later than the transmit/receive times.
 		 */
 		xpkt.li_vn_mode = PKT_LI_VN_MODE(xmt_leap,
 		    PKT_VERSION(rpkt->li_vn_mode), xmode);
@@ -4452,12 +4575,60 @@
 		xpkt.precision = sys_precision;
 		xpkt.refid = sys_refid;
 		xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
-		xpkt.rootdisp = HTONS_FP(DTOUFP(sys_rootdisp));
 
+		/*
+		** Server Response Fuzzing
+		**
+		** Which values do we want to use for reftime and rootdisp?
+		*/
+
+		if (   MODE_SERVER == xmode
+		    && RES_SRVRSPFUZ & flags) {
+			if (current_time < p2_time) {
+				this_ref_time = p2_reftime;
+				this_rootdisp = p2_rootdisp;
+			} else if (current_time < prev_time) {
+				this_ref_time = prev_reftime;
+				this_rootdisp = prev_rootdisp;
+			} else {
+				this_ref_time = sys_reftime;
+				this_rootdisp = sys_rootdisp;
+			}
+
+			SRVRSP_FUZZ(this_ref_time);
+		} else {
+			this_ref_time = sys_reftime;
+			this_rootdisp = sys_rootdisp;
+		}
+
+		/*
+		** ROOT DISPERSION
+		*/
+
+		xpkt.rootdisp = HTONS_FP(DTOUFP(this_rootdisp));
+
+		/*
+		** REFTIME
+		*/
+
 #ifdef LEAP_SMEAR
-		this_ref_time = sys_reftime;
 		if (leap_smear.in_progress) {
+			/* adjust the reftime by the same amount as the
+			 * leap smear, as we don't want to risk the
+			 * reftime being later than the transmit time.
+			 */
 			leap_smear_add_offs(&this_ref_time, NULL);
+		}
+#endif
+
+		HTONL_FP(&this_ref_time, &xpkt.reftime);
+
+		/*
+		** REFID
+		*/
+
+#ifdef LEAP_SMEAR
+		if (leap_smear.in_progress) {
 			xpkt.refid = convertLFPToRefID(leap_smear.offset);
 			DPRINTF(2, ("fast_xmit: leap_smear.in_progress: refid %8x, smear %s\n",
 				ntohl(xpkt.refid),
@@ -4464,13 +4635,17 @@
 				lfptoa(&leap_smear.offset, 8)
 				));
 		}
-		HTONL_FP(&this_ref_time, &xpkt.reftime);
-#else
-		HTONL_FP(&sys_reftime, &xpkt.reftime);
 #endif
 
+		/*
+		** ORIGIN
+		*/
+
 		xpkt.org = rpkt->xmt;
 
+		/*
+		** RECEIVE
+		*/
 #ifdef LEAP_SMEAR
 		this_recv_time = rbufp->recv_time;
 		if (leap_smear.in_progress)
@@ -4480,6 +4655,10 @@
 		HTONL_FP(&rbufp->recv_time, &xpkt.rec);
 #endif
 
+		/*
+		** TRANSMIT
+		*/
+
 		get_systime(&xmt_tx);
 #ifdef LEAP_SMEAR
 		if (leap_smear.in_progress)
@@ -4580,10 +4759,11 @@
 	struct interface *	lcladr;
 	sockaddr_u *		rmtadr;
 	r4addr			r4a;
-	int			restrict_mask;
+	u_short			restrict_mask;
 	struct peer *		p;
 	l_fp			xmt_tx;
 
+	DEBUG_REQUIRE(pool);
 	if (NULL == pool->ai) {
 		if (pool->addrs != NULL) {
 			/* free() is used with copy_addrinfo_list() */
@@ -4635,10 +4815,28 @@
 	xpkt.refid = sys_refid;
 	xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
 	xpkt.rootdisp = HTONS_FP(DTOUFP(sys_rootdisp));
+	/* Bug 3596: What are the pros/cons of using sys_reftime here? */
 	HTONL_FP(&sys_reftime, &xpkt.reftime);
+
+	/* HMS: the following is better done after the ntp_random() calls */
 	get_systime(&xmt_tx);
 	pool->aorg = xmt_tx;
-	HTONL_FP(&xmt_tx, &xpkt.xmt);
+
+	if (FLAG_LOOPNONCE & pool->flags) {
+		l_fp nonce;
+
+		do {
+			nonce.l_ui = ntp_random();
+		} while (0 == nonce.l_ui);
+		do {
+			nonce.l_uf = ntp_random();
+		} while (0 == nonce.l_uf);
+		pool->nonce = nonce;
+		HTONL_FP(&nonce, &xpkt.xmt);
+	} else {
+		L_CLR(&pool->nonce);
+		HTONL_FP(&xmt_tx, &xpkt.xmt);
+	}
 	sendpkt(rmtadr, lcladr,
 		sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl],
 		&xpkt, LEN_PKT_NOMAC);
--- contrib/ntp/ntpd/ntp_refclock.c.orig
+++ contrib/ntp/ntpd/ntp_refclock.c
@@ -12,6 +12,7 @@
 #include "ntp_refclock.h"
 #include "ntp_stdlib.h"
 #include "ntp_assert.h"
+#include "timespecops.h"
 
 #include <stdio.h>
 
@@ -66,11 +67,82 @@
 /*
  * Forward declarations
  */
-static int refclock_cmpl_fp (const void *, const void *);
-static int refclock_sample (struct refclockproc *);
-static int refclock_ioctl(int, u_int);
+static int  refclock_cmpl_fp (const void *, const void *);
+static int  refclock_sample (struct refclockproc *);
+static int  refclock_ioctl(int, u_int);
+static void refclock_checkburst(struct peer *, struct refclockproc *);
 
+/* circular buffer functions
+ *
+ * circular buffer management comes in two flovours:
+ * for powers of two, and all others.
+ */
 
+#if MAXSTAGE & (MAXSTAGE - 1)
+
+static void clk_add_sample(
+	struct refclockproc * const	pp,
+	double				sv
+	)
+{
+	pp->coderecv = (pp->coderecv + 1) % MAXSTAGE;
+	if (pp->coderecv == pp->codeproc)
+		pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
+	pp->filter[pp->coderecv] = sv;
+}
+
+static double clk_pop_sample(
+	struct refclockproc * const	pp
+	)
+{
+	if (pp->coderecv == pp->codeproc)
+		return 0; /* Maybe a NaN would be better? */
+	pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
+	return pp->filter[pp->codeproc];
+}
+
+static inline u_int clk_cnt_sample(
+	struct refclockproc * const	pp
+	)
+{
+	u_int retv = pp->coderecv - pp->codeproc;
+	if (retv > MAXSTAGE)
+		retv += MAXSTAGE;
+	return retv;
+}
+
+#else
+
+static inline void clk_add_sample(
+	struct refclockproc * const	pp,
+	double				sv
+	)
+{
+	pp->coderecv  = (pp->coderecv + 1) & (MAXSTAGE - 1);
+	if (pp->coderecv == pp->codeproc)
+		pp->codeproc = (pp->codeproc + 1) & (MAXSTAGE - 1);
+	pp->filter[pp->coderecv] = sv;
+}
+
+static inline double clk_pop_sample(
+	struct refclockproc * const	pp
+	)
+{
+	if (pp->coderecv == pp->codeproc)
+		return 0; /* Maybe a NaN would be better? */
+	pp->codeproc = (pp->codeproc + 1) & (MAXSTAGE - 1);
+	return pp->filter[pp->codeproc];
+}
+
+static inline u_int clk_cnt_sample(
+	struct refclockproc * const	pp
+	)
+{
+	return (pp->coderecv - pp->codeproc) & (MAXSTAGE - 1);
+}
+
+#endif
+
 /*
  * refclock_report - note the occurance of an event
  *
@@ -328,9 +400,10 @@
 	} else {
 		peer->burst--;
 	}
+	peer->procptr->inpoll = TRUE;
 	if (refclock_conf[clktype]->clock_poll != noentry)
 		(refclock_conf[clktype]->clock_poll)(unit, peer);
-	poll_update(peer, peer->hpoll);
+	poll_update(peer, peer->hpoll, 0);
 }
 
 
@@ -353,8 +426,67 @@
 	return 0;
 }
 
+/*
+ * Get number of available samples
+ */
+int
+refclock_samples_avail(
+	struct refclockproc const * pp
+	)
+{
+	u_int	na;
+	
+#   if MAXSTAGE & (MAXSTAGE - 1)
+	
+	na = pp->coderecv - pp->codeproc;
+	if (na > MAXSTAGE)
+		na += MAXSTAGE;
+	
+#   else
+	
+	na = (pp->coderecv - pp->codeproc) & (MAXSTAGE - 1);
+	
+#   endif
+	return na;
+}
 
 /*
+ * Expire (remove) samples from the tail (oldest samples removed)
+ *
+ * Returns number of samples deleted
+ */
+int
+refclock_samples_expire(
+	struct refclockproc * pp,
+	int                   nd
+	)
+{
+	u_int	na;
+	
+	if (nd <= 0)
+		return 0;
+
+#   if MAXSTAGE & (MAXSTAGE - 1)
+	
+	na = pp->coderecv - pp->codeproc;
+	if (na > MAXSTAGE)
+		na += MAXSTAGE;
+	if ((u_int)nd < na)
+		nd = na;	
+	pp->codeproc = (pp->codeproc + nd) % MAXSTAGE;
+	
+#   else
+	
+	na = (pp->coderecv - pp->codeproc) & (MAXSTAGE - 1);
+	if ((u_int)nd > na)
+		nd = (int)na;
+	pp->codeproc = (pp->codeproc + nd) & (MAXSTAGE - 1);
+	
+#   endif
+	return nd;
+}
+
+/*
  * refclock_process_offset - update median filter
  *
  * This routine uses the given offset and timestamps to construct a new
@@ -376,7 +508,8 @@
 	lftemp = lasttim;
 	L_SUB(&lftemp, &lastrec);
 	LFPTOD(&lftemp, doffset);
-	SAMPLE(doffset + fudge);
+	clk_add_sample(pp, doffset + fudge);
+	refclock_checkburst(pp->io.srcclock, pp);
 }
 
 
@@ -388,7 +521,7 @@
  * seconds and milliseconds/microseconds to internal timestamp format,
  * then constructs a new entry in the median filter circular buffer.
  * Return success (1) if the data are correct and consistent with the
- * converntional calendar.
+ * conventional calendar.
  *
  * Important for PPS users: Normally, the pp->lastrec is set to the
  * system time when the on-time character is received and the pp->year,
@@ -409,7 +542,7 @@
 	 * seconds and milliseconds/microseconds of the timecode. Use
 	 * clocktime() for the aggregate seconds and the msec/usec for
 	 * the fraction, when present. Note that this code relies on the
-	 * filesystem time for the years and does not use the years of
+	 * file system time for the years and does not use the years of
 	 * the timecode.
 	 */
 	if (!clocktime(pp->day, pp->hour, pp->minute, pp->second, GMT,
@@ -457,11 +590,8 @@
 	 * anything if the buffer is empty.
 	 */
 	n = 0;
-	while (pp->codeproc != pp->coderecv) {
-		pp->codeproc = (pp->codeproc + 1) % MAXSTAGE;
-		off[n] = pp->filter[pp->codeproc];
-		n++;
-	}
+	while (pp->codeproc != pp->coderecv)
+		off[n++] = clk_pop_sample(pp);
 	if (n == 0)
 		return (0);
 
@@ -494,6 +624,20 @@
 	}
 	pp->offset /= m;
 	pp->jitter = max(SQRT(pp->jitter / m), LOGTOD(sys_precision));
+
+	/*
+	 * If the source has a jitter that cannot be estimated, because
+	 * it is not statistic jitter, the source will be detected as
+	 * falseticker sooner or later.  Enforcing a minimal jitter value
+	 * avoids a too low estimation while still detecting higher jitter.
+	 *
+	 * Note that this changes the refclock samples and ends up in the
+	 * clock dispersion, not the clock jitter, despite being called
+	 * jitter.  To see the modified values, check the NTP clock variable
+	 * "filtdisp", not "jitter".
+	 */
+	pp->jitter = max(pp->jitter, pp->fudgeminjitter);
+
 #ifdef DEBUG
 	if (debug)
 		printf(
@@ -532,6 +676,7 @@
 	 * filter.
 	 */
 	pp = peer->procptr;
+	pp->inpoll = FALSE;
 	peer->leap = pp->leap;
 	if (peer->leap == LEAP_NOTINSYNC)
 		return;
@@ -542,7 +687,7 @@
 		report_event(PEVNT_REACH, peer, NULL);
 		peer->timereachable = current_time;
 	}
-	peer->reach |= 1;
+	peer->reach = (peer->reach << (peer->reach & 1)) | 1;
 	peer->reftime = pp->lastref;
 	peer->aorg = pp->lastrec;
 	peer->rootdisp = pp->disp;
@@ -1080,6 +1225,8 @@
 			pp->sloppyclockflag &= ~CLK_FLAG4;
 			pp->sloppyclockflag |= in->flags & CLK_FLAG4;
 		}
+		if (in->haveflags & CLK_HAVEMINJIT)
+			pp->fudgeminjitter = in->fudgeminjitter;
 	}
 
 	/*
@@ -1104,6 +1251,9 @@
 			out->haveflags |= CLK_HAVEFLAG3;
 		if (CLK_FLAG4 & out->flags)
 			out->haveflags |= CLK_HAVEFLAG4;
+		out->fudgeminjitter = pp->fudgeminjitter;
+		if (0.0 != out->fudgeminjitter)
+			out->haveflags |= CLK_HAVEMINJIT;
 
 		out->timereset = current_time - pp->timestarted;
 		out->polls = pp->polls;
@@ -1367,7 +1517,8 @@
 	 */
 	pp->lastrec.l_ui = (u_int32)ap->ts.tv_sec + JAN_1970;
 	pp->lastrec.l_uf = (u_int32)(dtemp * FRAC);
-	SAMPLE(dcorr);
+	clk_add_sample(pp, dcorr);
+	refclock_checkburst(peer, pp);
 	
 #ifdef DEBUG
 	if (debug > 1)
@@ -1377,4 +1528,245 @@
 	return (1);
 }
 #endif /* HAVE_PPSAPI */
+
+
+/*
+ * -------------------------------------------------------------------
+ * refclock_ppsaugment(...) -- correlate with PPS edge
+ *
+ * This function is used to correlate a receive time stamp with a PPS
+ * edge time stamp. It applies the necessary fudges and then tries to
+ * move the receive time stamp to the corresponding edge. This can warp
+ * into future, if a transmission delay of more than 500ms is not
+ * compensated with a corresponding fudge time2 value, because then the
+ * next PPS edge is nearer than the last. (Similiar to what the PPS ATOM
+ * driver does, but we deal with full time stamps here, not just phase
+ * shift information.) Likewise, a negative fudge time2 value must be
+ * used if the reference time stamp correlates with the *following* PPS
+ * pulse.
+ *
+ * Note that the receive time fudge value only needs to move the receive
+ * stamp near a PPS edge but that close proximity is not required;
+ * +/-100ms precision should be enough. But since the fudge value will
+ * probably also be used to compensate the transmission delay when no
+ * PPS edge can be related to the time stamp, it's best to get it as
+ * close as possible.
+ *
+ * It should also be noted that the typical use case is matching to the
+ * preceeding edge, as most units relate their sentences to the current
+ * second.
+ *
+ * The function returns FALSE if there is no correlation possible, TRUE
+ * otherwise.  Reason for failures are:
+ *
+ *  - no PPS/ATOM unit given
+ *  - PPS stamp is stale (that is, the difference between the PPS stamp
+ *    and the corrected time stamp would exceed two seconds)
+ *  - The phase difference is too close to 0.5, and the decision wether
+ *    to move up or down is too sensitive to noise.
+ *
+ * On output, the receive time stamp is updated with the 'fixed' receive
+ * time.
+ * -------------------------------------------------------------------
+ */
+
+int/*BOOL*/
+refclock_ppsaugment(
+	const struct refclock_atom * ap	    ,	/* for PPS io	  */
+	l_fp 			   * rcvtime ,
+	double			     rcvfudge,	/* i/o read fudge */
+	double			     ppsfudge	/* pps fudge	  */
+	)
+{
+	l_fp		delta[1];
+	
+#ifdef HAVE_PPSAPI
+
+	pps_info_t	pps_info;
+	struct timespec timeout;
+	l_fp		stamp[1];
+	uint32_t	phase;
+
+	static const uint32_t s_plim_hi = UINT32_C(1932735284);
+	static const uint32_t s_plim_lo = UINT32_C(2362232013);
+	
+	/* fixup receive time in case we have to bail out early */
+	DTOLFP(rcvfudge, delta);
+	L_SUB(rcvtime, delta);
+
+	if (NULL == ap)
+		return FALSE;
+	
+	ZERO(timeout);
+	ZERO(pps_info);
+
+	/* fetch PPS stamp from ATOM block */
+	if (time_pps_fetch(ap->handle, PPS_TSFMT_TSPEC,
+			   &pps_info, &timeout) < 0)
+		return FALSE; /* can't get time stamps */
+
+	/* get last active PPS edge before receive */
+	if (ap->pps_params.mode & PPS_CAPTUREASSERT)
+		timeout = pps_info.assert_timestamp;
+	else if (ap->pps_params.mode & PPS_CAPTURECLEAR)
+		timeout = pps_info.clear_timestamp;
+	else
+		return FALSE; /* WHICH edge, please?!? */
+
+	/* convert PPS stamp to l_fp and apply fudge */
+	*stamp = tspec_stamp_to_lfp(timeout);
+	DTOLFP(ppsfudge, delta);
+	L_SUB(stamp, delta);
+
+	/* Get difference between PPS stamp (--> yield) and receive time
+	 * (--> base)
+	 */
+	*delta = *stamp;
+	L_SUB(delta, rcvtime);
+
+	/* check if either the PPS or the STAMP is stale in relation
+	 * to each other. Bail if it is so...
+	 */
+	phase = delta->l_ui;
+	if (phase >= 2 && phase < (uint32_t)-2)
+		return FALSE; /* PPS is stale, don't use it */
+	
+	/* If the phase is too close to 0.5, the decision whether to
+	 * move up or down is becoming noise sensitive. That is, we
+	 * might amplify usec noise between samples into seconds with a
+	 * simple threshold. This can be solved by a Schmitt Trigger
+	 * characteristic, but that would also require additional state
+	 * where we could remember previous decisions.  Easier to play
+	 * dead duck and wait for the conditions to become clear.
+	 */
+	phase = delta->l_uf;
+	if (phase > s_plim_hi && phase < s_plim_lo)
+		return FALSE; /* we're in the noise lock gap */
+	
+	/* sign-extend fraction into seconds */
+	delta->l_ui = UINT32_C(0) - ((phase >> 31) & 1);
+	/* add it up now */
+	L_ADD(rcvtime, delta);
+	return TRUE;
+
+#   else /* have no PPS support at all */
+	
+	/* just fixup receive time and fail */
+	UNUSED_ARG(ap);
+	UNUSED_ARG(ppsfudge);
+
+	DTOLFP(rcvfudge, delta);
+	L_SUB(rcvtime, delta);
+	return FALSE;
+	
+#   endif
+}
+
+/*
+ * -------------------------------------------------------------------
+ * check if it makes sense to schedule an 'early' poll to get the clock
+ * up fast after start or longer signal dropout.
+ */
+static void
+refclock_checkburst(
+	struct peer *         peer,
+	struct refclockproc * pp
+	)
+{
+	uint32_t	limit;	/* when we should poll */
+	u_int		needs;	/* needed number of samples */
+
+	/* Paranoia: stop here if peer and clockproc don't match up.
+	 * And when a poll is actually pending, we don't have to do
+	 * anything, either. Likewise if the reach mask is full, of
+	 * course, and if the filter has stabilized.
+	 */
+	if (pp->inpoll || (peer->procptr != pp) ||
+	    ((peer->reach == 0xFF) && (peer->disp <= MAXDISTANCE)))
+		return;
+
+	/* If the next poll is soon enough, bail out, too: */
+	limit = current_time + 1;
+	if (peer->nextdate <= limit)
+		return;
+
+	/* Derive the number of samples needed from the popcount of the
+	 * reach mask.  With less samples available, we break away.
+	 */
+	needs  = peer->reach;
+	needs -= (needs >> 1) & 0x55; 
+	needs  = (needs & 0x33) + ((needs >> 2) & 0x33);
+	needs  = (needs + (needs >> 4)) & 0x0F;
+	if (needs > 6)
+		needs = 6;
+	else if (needs < 3)
+		needs = 3;
+	if (clk_cnt_sample(pp) < needs)
+		return;
+
+	/* Get serious. Reduce the poll to minimum and schedule early.
+	 * (Changing the peer poll is probably in vain, as it will be
+	 * re-adjusted, but maybe some time the hint will work...) 
+	 */
+	peer->hpoll = peer->minpoll;
+	peer->nextdate = limit;
+}
+
+/*
+ * -------------------------------------------------------------------
+ * Save the last timecode string, making sure it's properly truncated
+ * if necessary and NUL terminated in any case.
+ */
+void
+refclock_save_lcode(
+	struct refclockproc *	pp,
+	char const *		tc,
+	size_t			len
+	)
+{
+	if (len == (size_t)-1)
+		len = strnlen(tc,  sizeof(pp->a_lastcode) - 1);
+	else if (len >= sizeof(pp->a_lastcode))
+		len = sizeof(pp->a_lastcode) - 1;
+
+	pp->lencode = (u_short)len;
+	memcpy(pp->a_lastcode, tc, len);
+	pp->a_lastcode[len] = '\0';
+}
+
+/* format data into a_lastcode */
+void
+refclock_vformat_lcode(
+	struct refclockproc *	pp,
+	char const *		fmt,
+	va_list			va
+	)
+{
+	long len;
+
+	len = vsnprintf(pp->a_lastcode, sizeof(pp->a_lastcode), fmt, va);
+	if (len <= 0)
+		len = 0;
+	else if (len >= sizeof(pp->a_lastcode))
+		len = sizeof(pp->a_lastcode) - 1;
+	
+	pp->lencode = (u_short)len;
+	pp->a_lastcode[len] = '\0';
+	/* !note! the NUL byte is needed in case vsnprintf() really fails */
+}
+
+void
+refclock_format_lcode(
+	struct refclockproc *	pp,
+	char const *		fmt,
+	...
+	)
+{
+	va_list va;
+	
+	va_start(va, fmt);
+	refclock_vformat_lcode(pp, fmt, va);
+	va_end(va);	
+}
+
 #endif /* REFCLOCK */
--- contrib/ntp/ntpd/ntp_request.c.orig
+++ contrib/ntp/ntpd/ntp_request.c
@@ -841,7 +841,7 @@
 		pp = findexistingpeer(&addr, NULL, NULL, -1, 0, NULL);
 		if (NULL == pp)
 			continue;
-		if (IS_IPV6(srcadr)) {
+		if (IS_IPV6(&pp->srcadr)) {
 			if (pp->dstadr)
 				ip->dstadr6 =
 				    (MDF_BCAST == pp->cast_flags)
@@ -1819,7 +1819,7 @@
 	bad = 0;
 	while (items-- > 0 && !bad) {
 		memcpy(&cr, datap, item_sz);
-		cr.flags = ntohs(cr.flags);
+		cr.flags = ntohs(cr.flags);	/* XXX */
 		cr.mflags = ntohs(cr.mflags);
 		if (~RESM_NTPONLY & cr.mflags)
 			bad |= 1;
@@ -1854,7 +1854,7 @@
 
 	while (items-- > 0) {
 		memcpy(&cr, datap, item_sz);
-		cr.flags = ntohs(cr.flags);
+		cr.flags = ntohs(cr.flags);	/* XXX: size */
 		cr.mflags = ntohs(cr.mflags);
 		cr.ippeerlimit = ntohs(cr.ippeerlimit);
 		if (client_v6_capable && cr.v6_flag) {
--- contrib/ntp/ntpd/ntp_restrict.c.orig
+++ contrib/ntp/ntpd/ntp_restrict.c
@@ -96,7 +96,7 @@
  * "restrict source ..." enabled knob and restriction bits.
  */
 static	int		restrict_source_enabled;
-static	u_short		restrict_source_rflags;
+static	u_int32		restrict_source_rflags;
 static	u_short		restrict_source_mflags;
 static	short		restrict_source_ippeerlimit;
 
@@ -141,7 +141,7 @@
 		inet_ntop(AF_INET, &sia, as, sizeof as);
 		inet_ntop(AF_INET, &sim, ms, sizeof ms);
 	}
-	mprintf("restrict node at %p: %s/%s count %d, rflags %05x, mflags %05x, ippeerlimit %d, expire %lu, next %p\n",
+	mprintf("restrict node at %p: %s/%s count %d, rflags %08x, mflags %04x, ippeerlimit %d, expire %lu, next %p\n",
 		res, as, ms, res->count, res->rflags, res->mflags,
 		res->ippeerlimit, res->expire, res->link);
 	return;
@@ -154,8 +154,6 @@
 void
 dump_restricts(void)
 {
-	int		defaultv4_done = 0;
-	int		defaultv6_done = 0;
 	restrict_u *	res;
 	restrict_u *	next;
 
@@ -570,6 +568,7 @@
 		r4a->rflags = match->rflags;
 		r4a->ippeerlimit = match->ippeerlimit;
 	}
+
 	return;
 }
 
@@ -795,8 +794,8 @@
 		return;
 
 	hack_restrict(RESTRICT_FLAGS, addr, &onesmask,
-		      restrict_source_ippeerlimit, restrict_source_mflags,
-		      restrict_source_rflags, expire);
+		      restrict_source_ippeerlimit, 
+		      restrict_source_mflags, restrict_source_rflags, expire);
 	DPRINTF(1, ("restrict_source: %s host restriction added\n", 
 		    stoa(addr)));
 }
--- contrib/ntp/ntpd/ntp_scanner.c.orig
+++ contrib/ntp/ntpd/ntp_scanner.c
@@ -73,17 +73,26 @@
 {
 	size_t i;
 	const char *text;
+	static char sbuf[64];
 
 	i = token - LOWEST_KEYWORD_ID;
 
-	if (i < COUNTOF(keyword_text))
-		text = keyword_text[i];
-	else
-		text = NULL;
+	switch (token) {
+	    case T_ServerresponseFuzz:
+		text = "serverresponse fuzz";
+		break;
 
-	return (text != NULL)
-		   ? text
-		   : "(keyword not found)";
+	    default:
+		if (i < COUNTOF(keyword_text)) {
+			text = keyword_text[i];
+		} else {
+			snprintf(sbuf, sizeof sbuf,
+				"(keyword #%u not found)", token);
+			text = sbuf;
+		}
+	}
+
+	return text;
 }
 
 
--- contrib/ntp/ntpd/ntp_util.c.orig
+++ contrib/ntp/ntpd/ntp_util.c
@@ -58,6 +58,7 @@
 static char	  *leapfile_name;		/* leapseconds file name */
 static struct stat leapfile_stat;	/* leapseconds file stat() buffer */
 static int /*BOOL*/have_leapfile = FALSE;
+static int /*BOOL*/chck_leaphash = TRUE;
 char	*stats_drift_file;		/* frequency file name */
 static	char *stats_temp_file;		/* temp frequency file name */
 static double wander_resid;		/* last frequency update */
@@ -87,7 +88,7 @@
 
 /*
  * This controls whether stats are written to the fileset. Provided
- * so that ntpdc can turn off stats when the file system fills up. 
+ * so that ntpdc can turn off stats when the file system fills up.
  */
 int stats_control;
 
@@ -103,7 +104,7 @@
 	void	ntpd_time_stepped(void);
 static  void	check_leap_expiration(int, uint32_t, const time_t*);
 
-/* 
+/*
  * Prototypes
  */
 #ifdef DEBUG
@@ -287,15 +288,15 @@
 		/* atomic */
 #ifdef SYS_WINNT
 		if (_unlink(stats_drift_file)) /* rename semantics differ under NT */
-			msyslog(LOG_WARNING, 
-				"Unable to remove prior drift file %s, %m", 
+			msyslog(LOG_WARNING,
+				"Unable to remove prior drift file %s, %m",
 				stats_drift_file);
 #endif /* SYS_WINNT */
 
 #ifndef NO_RENAME
 		if (rename(stats_temp_file, stats_drift_file))
-			msyslog(LOG_WARNING, 
-				"Unable to rename temp drift file %s to %s, %m", 
+			msyslog(LOG_WARNING,
+				"Unable to rename temp drift file %s to %s, %m",
 				stats_temp_file, stats_drift_file);
 #else
 		/* we have no rename NFS of ftp in use */
@@ -329,7 +330,8 @@
 void
 stats_config(
 	int item,
-	const char *invalue	/* only one type so far */
+	const char *invalue,	/* only one type so far */
+	int optflag
 	)
 {
 	FILE	*fp;
@@ -385,7 +387,7 @@
 	} else {
 		value = newvalue;
 	}
-#else	 
+#else
 	value = invalue;
 #endif /* SYS_WINNT */
 
@@ -399,7 +401,7 @@
 			break;
 
 		stats_drift_file = erealloc(stats_drift_file, len + 1);
-		stats_temp_file = erealloc(stats_temp_file, 
+		stats_temp_file = erealloc(stats_temp_file,
 		    len + sizeof(".TEMP"));
 		memcpy(stats_drift_file, value, (size_t)(len+1));
 		memcpy(stats_temp_file, value, (size_t)len);
@@ -414,7 +416,7 @@
 
 		if (fscanf(fp, "%lf", &old_drift) != 1) {
 			msyslog(LOG_ERR,
-				"format error frequency file %s", 
+				"format error frequency file %s",
 				stats_drift_file);
 			fclose(fp);
 			break;
@@ -483,9 +485,11 @@
 
 		leapfile_name = erealloc(leapfile_name, len + 1);
 		memcpy(leapfile_name, value, len + 1);
+		chck_leaphash = optflag;
 
 		if (leapsec_load_file(
-			    leapfile_name, &leapfile_stat, TRUE, TRUE))
+			    leapfile_name, &leapfile_stat,
+			    TRUE, TRUE, chck_leaphash))
 		{
 			leap_signature_t lsig;
 
@@ -892,11 +896,11 @@
 	/* just do nothing if there is no leap file */
 	if ( ! (leapfile_name && *leapfile_name))
 		return;
-	
+
 	/* try to load leapfile, force it if no leapfile loaded yet */
 	if (leapsec_load_file(
 		    leapfile_name, &leapfile_stat,
-		    !have_leapfile, is_daily_check))
+		    !have_leapfile, is_daily_check, chck_leaphash))
 		have_leapfile = TRUE;
 	else if (!have_leapfile)
 		return;
@@ -921,7 +925,7 @@
 	 * level and frequency (once/hour or once/day, depending on the
 	 * state.
 	 */
-	rc = leapsec_daystolive(ntptime, systime);	
+	rc = leapsec_daystolive(ntptime, systime);
 	if (rc == 0) {
 		msyslog(LOG_WARNING,
 			"%s ('%s'): will expire in less than one day",
@@ -929,7 +933,7 @@
 	} else if (is_daily_check && rc < 28) {
 		if (rc < 0)
 			msyslog(LOG_ERR,
-				"%s ('%s'): expired less than %d day%s ago",
+				"%s ('%s'): expired %d day%s ago",
 				logPrefix, leapfile_name, -rc, (rc == -1 ? "" : "s"));
 		else
 			msyslog(LOG_WARNING,
@@ -952,7 +956,7 @@
 	len = strlen(keyfile);
 	if (!len)
 		return;
-	
+
 #ifndef SYS_WINNT
 	key_file_name = erealloc(key_file_name, len + 1);
 	memcpy(key_file_name, keyfile, len + 1);
--- contrib/ntp/ntpd/ntpd-opts.c.orig
+++ contrib/ntp/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:40:30 PM by AutoGen 5.18.5
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpd program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -75,8 +75,8 @@
  *  static const strings for ntpd options
  */
 static char const ntpd_opt_strs[3132] =
-/*     0 */ "ntpd 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "ntpd 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -205,12 +205,12 @@
 /*  2901 */ "output version information and exit\0"
 /*  2937 */ "version\0"
 /*  2945 */ "NTPD\0"
-/*  2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p13\n"
+/*  2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
             "\t\t[ <server1> ... <serverN> ]\n\0"
 /*  3082 */ "http://bugs.ntp.org, bugs@ntp.org\0"
 /*  3116 */ "\n\0"
-/*  3118 */ "ntpd 4.2.8p13";
+/*  3118 */ "ntpd 4.2.8p14";
 
 /**
  *  ipv4 option description with
@@ -1529,8 +1529,8 @@
      translate option names.
    */
   /* referenced via ntpdOptions.pzCopyright */
-  puts(_("ntpd 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("ntpd 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -1670,7 +1670,7 @@
   puts(_("output version information and exit"));
 
   /* referenced via ntpdOptions.pzUsageTitle */
-  puts(_("ntpd - NTP daemon program - Ver. 4.2.8p13\n\
+  puts(_("ntpd - NTP daemon program - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
 \t\t[ <server1> ... <serverN> ]\n"));
 
@@ -1678,7 +1678,7 @@
   puts(_("\n"));
 
   /* referenced via ntpdOptions.pzFullVersion */
-  puts(_("ntpd 4.2.8p13"));
+  puts(_("ntpd 4.2.8p14"));
 
   /* referenced via ntpdOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/ntpd/ntpd-opts.h.orig
+++ contrib/ntp/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:40:30 PM by AutoGen 5.18.5
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpd program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -106,9 +106,9 @@
 /** count of all options for ntpd */
 #define OPTION_CT    38
 /** ntpd version */
-#define NTPD_VERSION       "4.2.8p13"
+#define NTPD_VERSION       "4.2.8p14"
 /** Full ntpd version text */
-#define NTPD_FULL_VERSION  "ntpd 4.2.8p13"
+#define NTPD_FULL_VERSION  "ntpd 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/ntpd/ntpd.1ntpdman.orig
+++ contrib/ntp/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpd 1ntpdman "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpd 1ntpdman "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:05 PM by AutoGen 5.18.5
 .\" From the definitions ntpd-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -979,7 +979,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The
--- contrib/ntp/ntpd/ntpd.1ntpdmdoc.orig
+++ contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPD 1ntpdmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:55 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -886,7 +886,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The
--- contrib/ntp/ntpd/ntpd.c.orig
+++ contrib/ntp/ntpd/ntpd.c
@@ -45,6 +45,9 @@
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
 #include <stdio.h>
 #ifdef HAVE_SYS_PARAM_H
 # include <sys/param.h>
@@ -82,6 +85,10 @@
 # include <sys/mman.h>
 #endif
 
+#ifdef HAVE_SYSEXITS_H
+# include <sysexits.h>
+#endif
+
 #ifdef HAVE_TERMIOS_H
 # include <termios.h>
 #endif
@@ -140,6 +147,21 @@
 DNSServiceRef mdns;
 #endif
 
+/* In case 'sysexits.h' is unavailable, define some exit codes here: */
+#ifndef EX_SOFTWARE
+# define EX_SOFTWARE	70
+#endif
+#ifndef EX_OSERR
+# define EX_OSERR	71
+#endif
+#ifndef EX_IOERR
+# define EX_IOERR	74
+#endif
+#ifndef EX_PROTOCOL
+#define EX_PROTOCOL	76
+#endif
+
+
 #ifdef HAVE_SETPGRP_0
 # define ntp_setpgrp(x, y)	setpgrp()
 #else
@@ -178,6 +200,10 @@
 int mdnstries = 5;
 #endif  /* HAVE_DNSREGISTRATION */
 
+#ifdef HAVE_LINUX_CAPABILITIES
+int have_caps;		/* runtime check whether capabilities work */
+#endif /* HAVE_LINUX_CAPABILITIES */
+
 #ifdef HAVE_DROPROOT
 int droproot;
 int root_dropped;
@@ -191,7 +217,7 @@
 #endif /* HAVE_DROPROOT */
 
 #ifdef HAVE_WORKING_FORK
-int	waitsync_fd_to_close = -1;	/* -w/--wait-sync */
+int	daemon_pipe[2] = { -1, -1 };
 #endif
 
 /*
@@ -221,7 +247,8 @@
 #endif
 
 #if !defined(SIM) && defined(HAVE_WORKING_FORK)
-static int	wait_child_sync_if	(int, long);
+static int	wait_child_sync_if	(int, unsigned long);
+static int	wait_child_exit_if	(pid_t, int);
 #endif
 
 #if !defined(SIM) && !defined(SYS_WINNT)
@@ -388,11 +415,9 @@
 
 	return ntpsim(argc, argv);
 }
-#else	/* !SIM follows */
-#ifdef NO_MAIN_ALLOWED
+#elif defined(NO_MAIN_ALLOWED)
 CALL(ntpd,"ntpd",ntpdmain);
-#else	/* !NO_MAIN_ALLOWED follows */
-#ifndef SYS_WINNT
+#elif !defined(SYS_WINNT)
 int
 main(
 	int argc,
@@ -402,8 +427,6 @@
 	return ntpdmain(argc, argv);
 }
 #endif /* !SYS_WINNT */
-#endif /* !NO_MAIN_ALLOWED */
-#endif /* !SIM */
 
 #ifdef _AIX
 /*
@@ -534,13 +557,13 @@
 # ifdef HAVE_WORKING_FORK
 static void
 detach_from_terminal(
-	int pipe_fds[2],
+	int pipe[2],
 	long wait_sync,
 	const char *logfilename
 	)
 {
-	int rc;
-	int exit_code;
+	pid_t	cpid;
+	int	exit_code;
 #  if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
 	int		fid;
 #  endif
@@ -548,16 +571,28 @@
 	struct sigaction sa;
 #  endif
 
-	rc = fork();
-	if (-1 == rc) {
-		exit_code = (errno) ? errno : -1;
-		msyslog(LOG_ERR, "fork: %m");
-		exit(exit_code);
-	}
-	if (rc > 0) {
+	cpid = fork();
+	if (0 != cpid) {
 		/* parent */
-		exit_code = wait_child_sync_if(pipe_fds[0],
-					       wait_sync);
+		if (-1 == cpid) {
+			msyslog(LOG_ERR, "fork: %m");
+			exit_code = EX_OSERR;
+		} else {
+			close(pipe[1]);
+			pipe[1] = -1;
+			exit_code = wait_child_sync_if(
+					pipe[0], wait_sync);
+			DPRINTF(1, ("sync_if: rc=%d\n", exit_code));
+			if (exit_code <= 0) {
+				/* probe daemon exit code -- wait for
+				 * child process if we have an unexpected
+				 * EOF on the monitor pipe.
+				 */
+				exit_code = wait_child_exit_if(
+						cpid, (exit_code < 0));
+				DPRINTF(1, ("exit_if: rc=%d\n", exit_code));
+			}
+		}
 		exit(exit_code);
 	}
 
@@ -572,7 +607,8 @@
 		syslog_file = NULL;
 		syslogit = TRUE;
 	}
-	close_all_except(waitsync_fd_to_close);
+	close_all_except(pipe[1]);
+	pipe[0] = -1;
 	INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
 		&& 2 == dup2(0, 2));
 
@@ -779,9 +815,6 @@
 # endif
 # if defined(HAVE_WORKING_FORK)
 	long		wait_sync = 0;
-	int		pipe_fds[2];
-	int		rc;
-	int		exit_code;
 # endif	/* HAVE_WORKING_FORK*/
 # ifdef SCO5_CLOCK
 	int		fd;
@@ -847,9 +880,16 @@
 				" %s", saved_argv[i]);
 			cp += strlen(cp);
 		}
-		msyslog(LOG_INFO, "%s", buf);
+		msyslog(LOG_NOTICE, "%s", buf);
 	}
 
+	msyslog(LOG_NOTICE, "----------------------------------------------------");
+	msyslog(LOG_NOTICE, "ntp-4 is maintained by Network Time Foundation,");
+	msyslog(LOG_NOTICE, "Inc. (NTF), a non-profit 501(c)(3) public-benefit");
+	msyslog(LOG_NOTICE, "corporation.  Support and training for ntp-4 are");
+	msyslog(LOG_NOTICE, "available at https://www.nwtime.org/support");
+	msyslog(LOG_NOTICE, "----------------------------------------------------");
+
 	/*
 	 * Install trap handlers to log errors and assertion failures.
 	 * Default handlers print to stderr which doesn't work if detached.
@@ -919,27 +959,24 @@
 # endif
 
 # ifdef HAVE_WORKING_FORK
-	/* make sure the FDs are initialised */
-	pipe_fds[0] = -1;
-	pipe_fds[1] = -1;
-	do {					/* 'loop' once */
-		if (!HAVE_OPT( WAIT_SYNC ))
-			break;
+	/* make sure the FDs are initialised
+	 *
+	 * note: if WAIT_SYNC is requested, we *have* to fork. This will
+	 * overide any '-n' (nofork) or '-d' (debug) option presented on
+	 * the command line!
+	 */
+	if (HAVE_OPT(WAIT_SYNC)) {
 		wait_sync = OPT_VALUE_WAIT_SYNC;
-		if (wait_sync <= 0) {
+		if (wait_sync <= 0)
 			wait_sync = 0;
-			break;
-		}
-		/* -w requires a fork() even with debug > 0 */
-		nofork = FALSE;
-		if (pipe(pipe_fds)) {
-			exit_code = (errno) ? errno : -1;
-			msyslog(LOG_ERR,
-				"Pipe creation failed for --wait-sync: %m");
-			exit(exit_code);
-		}
-		waitsync_fd_to_close = pipe_fds[1];
-	} while (0);				/* 'loop' once */
+		else
+			nofork = FALSE;
+	}
+	if ( !nofork && pipe(daemon_pipe)) {
+		msyslog(LOG_ERR,
+			"Pipe creation failed for --wait-sync/daemon: %m");
+		exit(EX_OSERR);
+	}
 # endif	/* HAVE_WORKING_FORK */
 
 	init_lib();
@@ -965,12 +1002,11 @@
 	/*
 	 * Detach us from the terminal.  May need an #ifndef GIZMO.
 	 */
+# ifdef HAVE_WORKING_FORK
 	if (!nofork) {
-
-# ifdef HAVE_WORKING_FORK
-		detach_from_terminal(pipe_fds, wait_sync, logfilename);
+		detach_from_terminal(daemon_pipe, wait_sync, logfilename);
+	}
 # endif		/* HAVE_WORKING_FORK */
-	}
 
 # ifdef SCO5_CLOCK
 	/*
@@ -1115,12 +1151,33 @@
 	report_event(EVNT_SYSRESTART, NULL, NULL);
 	initializing = FALSE;
 
+# ifdef HAVE_LINUX_CAPABILITIES
+	{
+		/*  Check that setting capabilities actually works; we might be
+		 *  run on a kernel with disabled capabilities. We must not
+		 *  drop privileges in this case.
+		 */
+		cap_t caps;
+		caps = cap_from_text("cap_sys_time,cap_setuid,cap_setgid,cap_sys_chroot,cap_net_bind_service=pe");
+		if ( ! caps) {
+			msyslog( LOG_ERR, "cap_from_text() failed: %m" );
+			exit(-1);
+		}
+		have_caps = (cap_set_proc(caps) == 0);
+		cap_free(caps);	/* caps not NULL here! */
+	}
+# endif /* HAVE_LINUX_CAPABILITIES */
+
 # ifdef HAVE_DROPROOT
+#  ifdef HAVE_LINUX_CAPABILITIES
+	if (droproot && have_caps) {
+#  else
 	if (droproot) {
+#  endif /*HAVE_LINUX_CAPABILITIES*/
 
-#ifdef NEED_EARLY_FORK
+#  ifdef NEED_EARLY_FORK
 		fork_nonchroot_worker();
-#endif
+#  endif
 
 		/* Drop super-user privileges and chroot now if the OS supports this */
 
@@ -1346,11 +1403,18 @@
 	}
 #endif /* LIBSECCOMP and KERN_SECCOMP */
 
-#ifdef SYS_WINNT
+#if defined(SYS_WINNT)
 	ntservice_isup();
-#endif
+#elif defined(HAVE_WORKING_FORK)
+	if (daemon_pipe[1] != -1) {
+		write(daemon_pipe[1], "R\n", 2);
+	}
+#endif /* HAVE_WORKING_FORK */
 
-# ifdef HAVE_IO_COMPLETION_PORT
+# ifndef HAVE_IO_COMPLETION_PORT
+	BLOCK_IO_AND_ALARM();
+	was_alarmed = FALSE;
+# endif
 
 	for (;;) {
 #if !defined(SIM) && defined(SIGDIE1)
@@ -1357,17 +1421,10 @@
 		if (signalled)
 			finish_safe(signo);
 #endif
+# ifdef HAVE_IO_COMPLETION_PORT
 		GetReceivedBuffers();
+
 # else /* normal I/O */
-
-	BLOCK_IO_AND_ALARM();
-	was_alarmed = FALSE;
-
-	for (;;) {
-#if !defined(SIM) && defined(SIGDIE1)
-		if (signalled)
-			finish_safe(signo);
-#endif		
 		if (alarm_flag) {	/* alarmed? */
 			was_alarmed = TRUE;
 			alarm_flag = FALSE;
@@ -1532,14 +1589,15 @@
  * wait_child_sync_if - implements parent side of -w/--wait-sync
  */
 # ifdef HAVE_WORKING_FORK
+
 static int
 wait_child_sync_if(
-	int	pipe_read_fd,
-	long	wait_sync
+	int		pipe_read_fd,
+	unsigned long	wait_sync
 	)
 {
 	int	rc;
-	int	exit_code;
+	char	ch;
 	time_t	wait_end_time;
 	time_t	cur_time;
 	time_t	wait_rem;
@@ -1546,12 +1604,15 @@
 	fd_set	readset;
 	struct timeval wtimeout;
 
-	if (0 == wait_sync) 
-		return 0;
+	/* we wait a bit for the child in *any* case, because on failure
+	 * of the child we have to get and inspect the exit code!
+	 */
+	wait_end_time = time(NULL);
+	if (wait_sync)
+		wait_end_time += wait_sync;
+	else
+		wait_end_time += 30;
 
-	/* waitsync_fd_to_close used solely by child */
-	close(waitsync_fd_to_close);
-	wait_end_time = time(NULL) + wait_sync;
 	do {
 		cur_time = time(NULL);
 		wait_rem = (wait_end_time > cur_time)
@@ -1566,10 +1627,9 @@
 		if (-1 == rc) {
 			if (EINTR == errno)
 				continue;
-			exit_code = (errno) ? errno : -1;
 			msyslog(LOG_ERR,
-				"--wait-sync select failed: %m");
-			return exit_code;
+				"daemon startup: select failed: %m");
+			return EX_IOERR;
 		}
 		if (0 == rc) {
 			/*
@@ -1586,16 +1646,70 @@
 				    NULL, &wtimeout);
 			if (0 == rc)	/* select() timeout */
 				break;
-			else		/* readable */
+		}
+		rc = read(pipe_read_fd, &ch, 1);
+		if (rc == 0) {
+			DPRINTF(2, ("daemon control: got EOF\n"));
+			return -1;	/* unexpected EOF, check daemon */
+		} else if (rc == 1) {
+			DPRINTF(2, ("daemon control: got '%c'\n",
+				    (ch >= ' ' ? ch : '.')));
+			if (ch == 'R' && !wait_sync)
 				return 0;
-		} else			/* readable */
-			return 0;
+			if (ch == 'S' && wait_sync)
+				return 0;
+		} else {
+			DPRINTF(2, ("daemon control: read 1 char failed: %s\n",
+				    strerror(errno)));
+			return EX_IOERR;
+		}
 	} while (wait_rem > 0);
 
-	fprintf(stderr, "%s: -w/--wait-sync %ld timed out.\n",
-		progname, wait_sync);
-	return ETIMEDOUT;
+	if (wait_sync) {
+		fprintf(stderr, "%s: -w/--wait-sync %ld timed out.\n",
+			progname, wait_sync);
+		return EX_PROTOCOL;
+	} else {
+		fprintf(stderr, "%s: daemon startup monitoring timed out.\n",
+			progname);
+		return 0;
+	}
 }
+
+
+static int
+wait_child_exit_if(
+	pid_t	cpid,
+	int	blocking
+	)
+{
+#    ifdef HAVE_WAITPID
+	int	rc = 0;
+	int	wstatus;
+	if (cpid == waitpid(cpid, &wstatus, (blocking ? 0 : WNOHANG))) {
+		DPRINTF(1, ("child (pid=%d) dead now\n", cpid));
+		if (WIFEXITED(wstatus)) {
+			rc = WEXITSTATUS(wstatus);
+			msyslog(LOG_ERR, "daemon child exited with code %d",
+				rc);
+		} else if (WIFSIGNALED(wstatus)) {
+			rc = EX_SOFTWARE;
+			msyslog(LOG_ERR, "daemon child died with signal %d",
+				WTERMSIG(wstatus));
+		} else {
+			rc = EX_SOFTWARE;
+			msyslog(LOG_ERR, "daemon child died with unknown cause");
+		}
+	} else {
+		DPRINTF(1, ("child (pid=%d) still alive\n", cpid));
+	}
+	return rc;
+#    else
+	UNUSED_ARG(cpid);
+	return 0;
+#    endif
+}
+
 # endif	/* HAVE_WORKING_FORK */
 
 
--- contrib/ntp/ntpd/ntpd.html.orig
+++ contrib/ntp/ntpd/ntpd.html
@@ -67,7 +67,7 @@
 symmetric and broadcast modes, and with both symmetric-key and public-key
 cryptography.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntpd</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntpd</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -309,7 +309,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p12
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p14
 Usage:  ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
                 [ &lt;server1&gt; ... &lt;serverN&gt; ]
   Flg Arg Option-Name    Description
@@ -331,7 +331,7 @@
    -g no  panicgate      Allow the first adjustment to be Big
                                 - may appear multiple times
    -G no  force-step-once Step any initial offset correction.
-   -i Str jaildir        Jail directory
+   -i --- jaildir        built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
    -I Str interface      Listen on an interface name or address
                                 - may appear multiple times
    -k Str keyfile        path to symmetric keys
@@ -354,7 +354,7 @@
    -s Str statsdir       Statistics file location
    -t Str trustedkey     Trusted key number
                                 - may appear multiple times
-   -u Str user           Run as userid (or userid:groupid)
+   -u --- user           built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
    -U Num updateinterval interval in seconds between scans for new or dropped interfaces
       Str var            make ARG an ntp variable (RW)
                                 - may appear multiple times
--- contrib/ntp/ntpd/ntpd.man.in.orig
+++ contrib/ntp/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpd @NTPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpd @NTPD_MS@ "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:05 PM by AutoGen 5.18.5
 .\" From the definitions ntpd-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -979,7 +979,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The
--- contrib/ntp/ntpd/ntpd.mdoc.in.orig
+++ contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPD @NTPD_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:55 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -886,7 +886,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The
--- contrib/ntp/ntpd/psl0.conf.orig
+++ contrib/ntp/ntpd/psl0.conf
@@ -0,0 +1 @@
+pollskewlist default 0|0
--- contrib/ntp/ntpd/psl1.conf.orig
+++ contrib/ntp/ntpd/psl1.conf
@@ -0,0 +1 @@
+pollskewlist default 4|4
--- contrib/ntp/ntpd/psl2.conf.orig
+++ contrib/ntp/ntpd/psl2.conf
@@ -0,0 +1 @@
+pollskewlist 3 3|3 4 4|4 default 5|5
--- contrib/ntp/ntpd/refclock_gpsdjson.c.orig
+++ contrib/ntp/ntpd/refclock_gpsdjson.c
@@ -949,7 +949,7 @@
 	pp->lastref = stamp;
 	if (pp->coderecv == pp->codeproc)
 		refclock_report(peer, CEVNT_NOMINAL);
-	refclock_process_offset(pp, stamp, recvt, pp->fudgetime1);
+	refclock_process_offset(pp, stamp, recvt, 0.0);
 }
 
 /* ------------------------------------------------------------------ */
--- contrib/ntp/ntpd/refclock_jupiter.c.orig
+++ contrib/ntp/ntpd/refclock_jupiter.c
@@ -35,6 +35,7 @@
 # include <config.h>
 #endif
 
+/* This clock *REQUIRES* the PPS API to be available */
 #if defined(REFCLOCK) && defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
 
 #include "ntpd.h"
@@ -42,16 +43,16 @@
 #include "ntp_refclock.h"
 #include "ntp_unixtime.h"
 #include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_calgps.h"
+#include "timespecops.h"
 
 #include <stdio.h>
 #include <ctype.h>
 
 #include "jupiter.h"
+#include "ppsapi_timepps.h"
 
-#ifdef HAVE_PPSAPI
-# include "ppsapi_timepps.h"
-#endif
-
 #ifdef WORDS_BIGENDIAN
 #define getshort(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff))
 #define putshort(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff))
@@ -108,23 +109,18 @@
  */
 struct instance {
 	struct peer *peer;		/* peer */
-	u_int  pollcnt;			/* poll message counter */
-	u_int  polled;			/* Hand in a time sample? */
-#ifdef HAVE_PPSAPI
+
 	pps_params_t pps_params;	/* pps parameters */
 	pps_info_t pps_info;		/* last pps data */
 	pps_handle_t pps_handle;	/* pps handle */
-	u_int assert;			/* pps edge to use */
-	u_int hardpps;			/* enable kernel mode */
-	struct timespec ts;		/* last timestamp */
-#endif
-	l_fp limit;
-	u_int gpos_gweek;		/* Current GPOS GPS week number */
-	u_int gpos_sweek;		/* Current GPOS GPS seconds into week */
-	u_int gweek;			/* current GPS week number */
-	u_int32 lastsweek;		/* last seconds into GPS week */
-	time_t timecode;		/* current ntp timecode */
-	u_int32 stime;			/* used to detect firmware bug */
+	u_int	assert;			/* pps edge to use */
+	u_int	hardpps;		/* enable kernel mode */
+	l_fp 		rcv_pps;	/* last pps timestamp */
+	l_fp	        rcv_next;	/* rcv time of next reftime */
+	TGpsDatum	ref_next;	/* next GPS time stamp to use with PPS */
+	TGpsDatum	piv_next;	/* pivot for week date unfolding */
+	uint16_t	piv_hold;	/* TTL for pivot value */
+	uint16_t	rcvtout;	/* receive timeout ticker */
 	int wantid;			/* don't reconfig on channel id msg */
 	u_int  moving;			/* mobile platform? */
 	u_char sloppyclockflag;		/* fudge flags */
@@ -135,28 +131,27 @@
 /*
  * Function prototypes
  */
-static	void	jupiter_canmsg	(struct instance *, u_int);
+static	void	jupiter_canmsg	(struct instance * const, u_int);
 static	u_short	jupiter_cksum	(u_short *, u_int);
-static	int	jupiter_config	(struct instance *);
+static	int	jupiter_config	(struct instance * const);
 static	void	jupiter_debug	(struct peer *, const char *,
 				 const char *, ...) NTP_PRINTF(3, 4);
-static	const char *	jupiter_parse_t	(struct instance *, u_short *);
-static	const char *	jupiter_parse_gpos	(struct instance *, u_short *);
-static	void	jupiter_platform	(struct instance *, u_int);
+static	const char *	jupiter_parse_t	(struct instance * const, u_short *, l_fp);
+static	const char *	jupiter_parse_gpos(struct instance * const, u_short *);
+static	void	jupiter_platform(struct instance * const, u_int);
 static	void	jupiter_poll	(int, struct peer *);
 static	void	jupiter_control	(int, const struct refclockstat *,
 				 struct refclockstat *, struct peer *);
-#ifdef HAVE_PPSAPI
-static	int	jupiter_ppsapi	(struct instance *);
-static	int	jupiter_pps	(struct instance *);
-#endif /* HAVE_PPSAPI */
-static	int	jupiter_recv	(struct instance *);
-static	void	jupiter_receive (struct recvbuf *rbufp);
-static	void	jupiter_reqmsg	(struct instance *, u_int, u_int);
-static	void	jupiter_reqonemsg(struct instance *, u_int);
-static	char *	jupiter_send	(struct instance *, struct jheader *);
+static	int	jupiter_ppsapi	(struct instance * const);
+static	int	jupiter_pps	(struct instance * const);
+static	int	jupiter_recv	(struct instance * const);
+static	void	jupiter_receive (struct recvbuf * const rbufp);
+static	void	jupiter_reqmsg	(struct instance * const, u_int, u_int);
+static	void	jupiter_reqonemsg(struct instance * const, u_int);
+static	char *	jupiter_send	(struct instance * const, struct jheader *);
 static	void	jupiter_shutdown(int, struct peer *);
 static	int	jupiter_start	(int, struct peer *);
+static	void	jupiter_ticker	(int, struct peer *);
 
 /*
  * Transfer vector
@@ -168,7 +163,7 @@
 	jupiter_control,	/* (clock control) */
 	noentry,		/* (clock init) */
 	noentry,		/* (clock buginfo) */
-	NOFLAGS			/* not used */
+	jupiter_ticker		/* 1HZ ticker */
 };
 
 /*
@@ -180,8 +175,8 @@
 	struct peer *peer
 	)
 {
-	struct refclockproc *pp;
-	struct instance *instance;
+	struct refclockproc * const pp = peer->procptr;
+	struct instance * up;
 	int fd;
 	char gpsdev[20];
 
@@ -197,9 +192,8 @@
 	}
 
 	/* Allocate unit structure */
-	instance = emalloc_zero(sizeof(*instance));
-	instance->peer = peer;
-	pp = peer->procptr;
+	up = emalloc_zero(sizeof(*up));
+	up->peer = peer;
 	pp->io.clock_recv = jupiter_receive;
 	pp->io.srcclock = peer;
 	pp->io.datalen = 0;
@@ -207,10 +201,10 @@
 	if (!io_addclock(&pp->io)) {
 		close(fd);
 		pp->io.fd = -1;
-		free(instance);
+		free(up);
 		return (0);
 	}
-	pp->unitptr = instance;
+	pp->unitptr = up;
 
 	/*
 	 * Initialize miscellaneous variables
@@ -219,26 +213,25 @@
 	pp->clockdesc = DESCRIPTION;
 	memcpy((char *)&pp->refid, REFID, 4);
 
-#ifdef HAVE_PPSAPI
-	instance->assert = 1;
-	instance->hardpps = 0;
+	up->assert = 1;
+	up->hardpps = 0;
 	/*
 	 * Start the PPSAPI interface if it is there. Default to use
 	 * the assert edge and do not enable the kernel hardpps.
 	 */
-	if (time_pps_create(fd, &instance->pps_handle) < 0) {
-		instance->pps_handle = 0;
+	if (time_pps_create(fd, &up->pps_handle) < 0) {
+		up->pps_handle = 0;
 		msyslog(LOG_ERR,
 			"refclock_jupiter: time_pps_create failed: %m");
 	}
-	else if (!jupiter_ppsapi(instance))
+	else if (!jupiter_ppsapi(up))
 		goto clean_up;
-#endif /* HAVE_PPSAPI */
-
+	
 	/* Ensure the receiver is properly configured */
-	if (!jupiter_config(instance))
+	if (!jupiter_config(up))
 		goto clean_up;
 
+	jupiter_pps(up);	/* get current PPS state */
 	return (1);
 
 clean_up:
@@ -253,24 +246,20 @@
 static void
 jupiter_shutdown(int unit, struct peer *peer)
 {
-	struct instance *instance;
-	struct refclockproc *pp;
-
-	pp = peer->procptr;
-	instance = pp->unitptr;
-	if (!instance)
+	struct refclockproc * const pp = peer->procptr;
+	struct instance *     const up = pp->unitptr;
+	
+	if (!up)
 		return;
 
-#ifdef HAVE_PPSAPI
-	if (instance->pps_handle) {
-		time_pps_destroy(instance->pps_handle);
-		instance->pps_handle = 0;
+	if (up->pps_handle) {
+		time_pps_destroy(up->pps_handle);
+		up->pps_handle = 0;
 	}
-#endif /* HAVE_PPSAPI */
 
 	if (pp->io.fd != -1)
 		io_closeclock(&pp->io);
-	free(instance);
+	free(up);
 }
 
 /*
@@ -277,88 +266,138 @@
  * jupiter_config - Configure the receiver
  */
 static int
-jupiter_config(struct instance *instance)
+jupiter_config(struct instance * const up)
 {
-	jupiter_debug(instance->peer, __func__, "init receiver");
+	jupiter_debug(up->peer, __func__, "init receiver");
 
 	/*
 	 * Initialize the unit variables
 	 */
-	instance->sloppyclockflag = instance->peer->procptr->sloppyclockflag;
-	instance->moving = !!(instance->sloppyclockflag & CLK_FLAG2);
-	if (instance->moving)
-		jupiter_debug(instance->peer, __func__, "mobile platform");
+	up->sloppyclockflag = up->peer->procptr->sloppyclockflag;
+	up->moving = !!(up->sloppyclockflag & CLK_FLAG2);
+	if (up->moving)
+		jupiter_debug(up->peer, __func__, "mobile platform");
 
-	instance->pollcnt     = 2;
-	instance->polled      = 0;
-	instance->gpos_gweek = 0;
-	instance->gpos_sweek = 0;
-	instance->gweek = 0;
-	instance->lastsweek = 2 * WEEKSECS;
-	instance->timecode = 0;
-	instance->stime = 0;
-	instance->ssize = 0;
+	ZERO(up->rcv_next);
+	ZERO(up->ref_next);
+	ZERO(up->piv_next);
+	up->ssize = 0;
 
 	/* Stop outputting all messages */
-	jupiter_canmsg(instance, JUPITER_ALL);
+	jupiter_canmsg(up, JUPITER_ALL);
 
 	/* Request the receiver id so we can syslog the firmware version */
-	jupiter_reqonemsg(instance, JUPITER_O_ID);
+	jupiter_reqonemsg(up, JUPITER_O_ID);
 
 	/* Flag that this the id was requested (so we don't get called again) */
-	instance->wantid = 1;
+	up->wantid = 1;
 
 	/* Request perodic time mark pulse messages */
-	jupiter_reqmsg(instance, JUPITER_O_PULSE, 1);
+	jupiter_reqmsg(up, JUPITER_O_PULSE, 1);
 
 	/* Request perodic geodetic position status */
-	jupiter_reqmsg(instance, JUPITER_O_GPOS, 1);
+	jupiter_reqmsg(up, JUPITER_O_GPOS, 1);
 
 	/* Set application platform type */
-	if (instance->moving)
-		jupiter_platform(instance, JUPITER_I_PLAT_MED);
+	if (up->moving)
+		jupiter_platform(up, JUPITER_I_PLAT_MED);
 	else
-		jupiter_platform(instance, JUPITER_I_PLAT_LOW);
+		jupiter_platform(up, JUPITER_I_PLAT_LOW);
 
 	return (1);
 }
 
-#ifdef HAVE_PPSAPI
+static void
+jupiter_checkpps(
+	struct refclockproc * const pp,
+	struct instance *     const up
+	)
+{
+	l_fp		tstamp, delta;
+	struct calendar	cd;
+	
+	if (jupiter_pps(up) || !up->piv_next.weeks)
+		return;
+
+	/* check delay between pulse message and pulse. */
+	delta = up->rcv_pps;		/* set by jupiter_pps() */
+	L_SUB(&delta, &up->rcv_next);	/* recv time pulse message */
+	if (delta.l_ui != 0 || delta.l_uf >= 0xC0000000) {
+		up->ref_next.weeks = 0;	/* consider as consumed... */
+		return;
+	}
+	
+	pp->lastrec = up->rcv_pps;
+	tstamp = ntpfp_from_gpsdatum(&up->ref_next);
+	refclock_process_offset(pp, tstamp, up->rcv_pps, pp->fudgetime1);
+	up->rcvtout = 2;
+
+	gpscal_to_calendar(&cd, &up->ref_next);
+	refclock_save_lcode(pp, ntpcal_iso8601std(NULL, 0, &cd),
+			    (size_t)-1);
+	up->ref_next.weeks = 0;	/* consumed... */
+}
+
 /*
+ * jupiter_ticker - process periodic checks
+ */
+static void
+jupiter_ticker(int unit, struct peer *peer)
+{
+	struct refclockproc * const pp = peer->procptr;
+	struct instance *     const up = pp->unitptr;
+
+	if (!up)
+		return;
+
+	/* check if we can add another sample now */
+	jupiter_checkpps(pp, up);
+
+	/* check the pivot update cycle */
+	if (up->piv_hold && !--up->piv_hold)
+		ZERO(up->piv_next);
+
+	if (up->rcvtout)
+		--up->rcvtout;
+	else if (pp->coderecv != pp->codeproc)
+		refclock_samples_expire(pp, 1);
+}
+
+/*
  * Initialize PPSAPI
  */
 int
 jupiter_ppsapi(
-	struct instance *instance	/* unit structure pointer */
+	struct instance * const up	/* unit structure pointer */
 	)
 {
 	int capability;
 
-	if (time_pps_getcap(instance->pps_handle, &capability) < 0) {
+	if (time_pps_getcap(up->pps_handle, &capability) < 0) {
 		msyslog(LOG_ERR,
 		    "refclock_jupiter: time_pps_getcap failed: %m");
 		return (0);
 	}
-	memset(&instance->pps_params, 0, sizeof(pps_params_t));
-	if (!instance->assert)
-		instance->pps_params.mode = capability & PPS_CAPTURECLEAR;
+	memset(&up->pps_params, 0, sizeof(pps_params_t));
+	if (!up->assert)
+		up->pps_params.mode = capability & PPS_CAPTURECLEAR;
 	else
-		instance->pps_params.mode = capability & PPS_CAPTUREASSERT;
-	if (!(instance->pps_params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR))) {
+		up->pps_params.mode = capability & PPS_CAPTUREASSERT;
+	if (!(up->pps_params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR))) {
 		msyslog(LOG_ERR,
 		    "refclock_jupiter: invalid capture edge %d",
-		    instance->assert);
+		    up->assert);
 		return (0);
 	}
-	instance->pps_params.mode |= PPS_TSFMT_TSPEC;
-	if (time_pps_setparams(instance->pps_handle, &instance->pps_params) < 0) {
+	up->pps_params.mode |= PPS_TSFMT_TSPEC;
+	if (time_pps_setparams(up->pps_handle, &up->pps_params) < 0) {
 		msyslog(LOG_ERR,
 		    "refclock_jupiter: time_pps_setparams failed: %m");
 		return (0);
 	}
-	if (instance->hardpps) {
-		if (time_pps_kcbind(instance->pps_handle, PPS_KC_HARDPPS,
-				    instance->pps_params.mode & ~PPS_TSFMT_TSPEC,
+	if (up->hardpps) {
+		if (time_pps_kcbind(up->pps_handle, PPS_KC_HARDPPS,
+				    up->pps_params.mode & ~PPS_TSFMT_TSPEC,
 				    PPS_TSFMT_TSPEC) < 0) {
 			msyslog(LOG_ERR,
 			    "refclock_jupiter: time_pps_kcbind failed: %m");
@@ -366,15 +405,15 @@
 		}
 		hardpps_enable = 1;
 	}
-/*	instance->peer->precision = PPS_PRECISION; */
+/*	up->peer->precision = PPS_PRECISION; */
 
 #if DEBUG
 	if (debug) {
-		time_pps_getparams(instance->pps_handle, &instance->pps_params);
-		jupiter_debug(instance->peer, __func__,
+		time_pps_getparams(up->pps_handle, &up->pps_params);
+		jupiter_debug(up->peer, __func__,
 			"pps capability 0x%x version %d mode 0x%x kern %d",
-			capability, instance->pps_params.api_version,
-			instance->pps_params.mode, instance->hardpps);
+			capability, up->pps_params.api_version,
+			up->pps_params.mode, up->hardpps);
 	}
 #endif
 
@@ -387,48 +426,44 @@
  * Return 0 on failure and 1 on success.
  */
 static int
-jupiter_pps(struct instance *instance)
+jupiter_pps(struct instance * const up)
 {
 	pps_info_t pps_info;
 	struct timespec timeout, ts;
-	double dtemp;
 	l_fp tstmp;
 
 	/*
 	 * Convert the timespec nanoseconds field to ntp l_fp units.
 	 */ 
-	if (instance->pps_handle == 0)
+	if (up->pps_handle == 0)
 		return 1;
 	timeout.tv_sec = 0;
 	timeout.tv_nsec = 0;
-	memcpy(&pps_info, &instance->pps_info, sizeof(pps_info_t));
-	if (time_pps_fetch(instance->pps_handle, PPS_TSFMT_TSPEC, &instance->pps_info,
+	memcpy(&pps_info, &up->pps_info, sizeof(pps_info_t));
+	if (time_pps_fetch(up->pps_handle, PPS_TSFMT_TSPEC, &up->pps_info,
 	    &timeout) < 0)
 		return 1;
-	if (instance->pps_params.mode & PPS_CAPTUREASSERT) {
+	if (up->pps_params.mode & PPS_CAPTUREASSERT) {
 		if (pps_info.assert_sequence ==
-		    instance->pps_info.assert_sequence)
+		    up->pps_info.assert_sequence)
 			return 1;
-		ts = instance->pps_info.assert_timestamp;
-	} else if (instance->pps_params.mode & PPS_CAPTURECLEAR) {
+		ts = up->pps_info.assert_timestamp;
+	} else if (up->pps_params.mode & PPS_CAPTURECLEAR) {
 		if (pps_info.clear_sequence ==
-		    instance->pps_info.clear_sequence)
+		    up->pps_info.clear_sequence)
 			return 1;
-		ts = instance->pps_info.clear_timestamp;
+		ts = up->pps_info.clear_timestamp;
 	} else {
 		return 1;
 	}
-	if ((instance->ts.tv_sec == ts.tv_sec) && (instance->ts.tv_nsec == ts.tv_nsec))
+
+	tstmp = tspec_stamp_to_lfp(ts);		
+	if (L_ISEQU(&tstmp, &up->rcv_pps))
 		return 1;
-	instance->ts = ts;
 
-	tstmp.l_ui = (u_int32)ts.tv_sec + JAN_1970;
-	dtemp = ts.tv_nsec * FRAC / 1e9;
-	tstmp.l_uf = (u_int32)dtemp;
-	instance->peer->procptr->lastrec = tstmp;
+	up->rcv_pps = tstmp;
 	return 0;
 }
-#endif /* HAVE_PPSAPI */
 
 /*
  * jupiter_poll - jupiter watchdog routine
@@ -436,37 +471,25 @@
 static void
 jupiter_poll(int unit, struct peer *peer)
 {
-	struct instance *instance;
-	struct refclockproc *pp;
+	struct refclockproc * const pp = peer->procptr;
+	struct instance *     const up = pp->unitptr;
 
-	pp = peer->procptr;
-	instance = pp->unitptr;
+	pp->polls++;
 
 	/*
-	 * You don't need to poll this clock.  It puts out timecodes
-	 * once per second.  If asked for a timestamp, take note.
-	 * The next time a timecode comes in, it will be fed back.
+	 * If we have new samples since last poll, everything is fine.
+	 * if not, blarb loudly.
 	 */
-
-	/*
-	 * If we haven't had a response in a while, reset the receiver.
-	 */
-	if (instance->pollcnt > 0) {
-		instance->pollcnt--;
+	if (pp->coderecv != pp->codeproc) {
+		refclock_receive(peer);
+		refclock_report(peer, CEVNT_NOMINAL);
 	} else {
 		refclock_report(peer, CEVNT_TIMEOUT);
 
 		/* Request the receiver id to trigger a reconfig */
-		jupiter_reqonemsg(instance, JUPITER_O_ID);
-		instance->wantid = 0;
+		jupiter_reqonemsg(up, JUPITER_O_ID);
+		up->wantid = 0;
 	}
-
-	/*
-	 * polled every 64 seconds. Ask jupiter_receive to hand in
-	 * a timestamp.
-	 */
-	instance->polled = 1;
-	pp->polls++;
 }
 
 /*
@@ -480,30 +503,21 @@
 	struct peer *peer	/* peer structure pointer */
 	)
 {
-	struct refclockproc *pp;
-	struct instance *instance;
+	struct refclockproc * const pp = peer->procptr;
+	struct instance *     const up = pp->unitptr;
+	
 	u_char sloppyclockflag;
 
-	pp = peer->procptr;
-	instance = pp->unitptr;
+	up->assert = !(pp->sloppyclockflag & CLK_FLAG3);
+	jupiter_ppsapi(up);
 
-	DTOLFP(pp->fudgetime2, &instance->limit);
-	/* Force positive value. */
-	if (L_ISNEG(&instance->limit))
-		L_NEG(&instance->limit);
-
-#ifdef HAVE_PPSAPI
-	instance->assert = !(pp->sloppyclockflag & CLK_FLAG3);
-	jupiter_ppsapi(instance);
-#endif /* HAVE_PPSAPI */
-
-	sloppyclockflag = instance->sloppyclockflag;
-	instance->sloppyclockflag = pp->sloppyclockflag;
-	if ((instance->sloppyclockflag & CLK_FLAG2) !=
+	sloppyclockflag = up->sloppyclockflag;
+	up->sloppyclockflag = pp->sloppyclockflag;
+	if ((up->sloppyclockflag & CLK_FLAG2) !=
 	    (sloppyclockflag & CLK_FLAG2)) {
 		jupiter_debug(peer, __func__,
 		    "mode switch: reset receiver");
-		jupiter_config(instance);
+		jupiter_config(up);
 		return;
 	}
 }
@@ -513,49 +527,43 @@
  * Gag me!
  */
 static void
-jupiter_receive(struct recvbuf *rbufp)
+jupiter_receive(struct recvbuf * const rbufp)
 {
+	struct peer *         const peer = rbufp->recv_peer;
+	struct refclockproc * const pp   = peer->procptr;
+	struct instance *     const up   = pp->unitptr;
+
 	size_t bpcnt;
-	int cc, size, ppsret;
-	time_t last_timecode;
-	u_int32 laststime;
+	int cc, size;
 	const char *cp;
 	u_char *bp;
 	u_short *sp;
 	struct jid *ip;
 	struct jheader *hp;
-	struct peer *peer;
-	struct refclockproc *pp;
-	struct instance *instance;
-	l_fp tstamp;
 
 	/* Initialize pointers and read the timecode and timestamp */
-	peer = rbufp->recv_peer;
-	pp = peer->procptr;
-	instance = pp->unitptr;
-
 	bp = (u_char *)rbufp->recv_buffer;
 	bpcnt = rbufp->recv_length;
 
 	/* This shouldn't happen */
-	if (bpcnt > sizeof(instance->sbuf) - instance->ssize)
-		bpcnt = sizeof(instance->sbuf) - instance->ssize;
+	if (bpcnt > sizeof(up->sbuf) - up->ssize)
+		bpcnt = sizeof(up->sbuf) - up->ssize;
 
 	/* Append to input buffer */
-	memcpy((u_char *)instance->sbuf + instance->ssize, bp, bpcnt);
-	instance->ssize += bpcnt;
+	memcpy((u_char *)up->sbuf + up->ssize, bp, bpcnt);
+	up->ssize += bpcnt;
 
 	/* While there's at least a header and we parse an intact message */
-	while (instance->ssize > (int)sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
-		instance->pollcnt = 2;
-
-		tstamp = rbufp->recv_time;
-		hp = (struct jheader *)instance->sbuf;
+	while (up->ssize > (int)sizeof(*hp) && (cc = jupiter_recv(up)) > 0) {
+		hp = (struct jheader *)up->sbuf;
 		sp = (u_short *)(hp + 1);
 		size = cc - sizeof(*hp);
 		switch (getshort(hp->id)) {
 
 		case JUPITER_O_PULSE:
+			/* first see if we can push another sample: */
+			jupiter_checkpps(pp, up);
+
 			if (size != sizeof(struct jpulse)) {
 				jupiter_debug(peer, __func__,
 				    "pulse: len %d != %u",
@@ -563,87 +571,24 @@
 				refclock_report(peer, CEVNT_BADREPLY);
 				break;
 			}
-
-			/*
-			 * There appears to be a firmware bug related
-			 * to the pulse message; in addition to the one
-			 * per second messages, we get an extra pulse
+ 			
+			/* Parse timecode (even when there's no pps)
+			 *
+			 * There appears to be a firmware bug related to
+			 * the pulse message; in addition to the one per
+			 * second messages, we get an extra pulse
 			 * message once an hour (on the anniversary of
 			 * the cold start). It seems to come 200 ms
-			 * after the one requested. So if we've seen a
-			 * pulse message in the last 210 ms, we skip
-			 * this one.
+			 * after the one requested.
+			 *
+			 * But since we feed samples only when a new PPS
+			 * pulse is found we can simply ignore that and
+			 * aggregate/update any existing timing message.
 			 */
-			laststime = instance->stime;
-			instance->stime = DS2UI(((struct jpulse *)sp)->stime);
-			if (laststime != 0 && instance->stime - laststime <= 21) {
+			if ((cp = jupiter_parse_t(up, sp, rbufp->recv_time)) != NULL) {
 				jupiter_debug(peer, __func__,
-				"avoided firmware bug (stime %.2f, laststime %.2f)",
-				(double)instance->stime * 0.01, (double)laststime * 0.01);
-				break;
-			}
-
-			/* Retrieve pps timestamp */
-			ppsret = jupiter_pps(instance);
-
-			/*
-			 * Add one second if msg received early
-			 * (i.e. before limit, a.k.a. fudgetime2) in
-			 * the second.
-			 */
-			L_SUB(&tstamp, &pp->lastrec);
-			if (!L_ISGEQ(&tstamp, &instance->limit))
-				++pp->lastrec.l_ui;
-
-			/* Parse timecode (even when there's no pps) */
-			last_timecode = instance->timecode;
-			if ((cp = jupiter_parse_t(instance, sp)) != NULL) {
-				jupiter_debug(peer, __func__,
 				    "pulse: %s", cp);
-				break;
 			}
-
-			/* Bail if we didn't get a pps timestamp */
-			if (ppsret)
-				break;
-
-			/* Bail if we don't have the last timecode yet */
-			if (last_timecode == 0)
-				break;
-
-			/* Add the new sample to a median filter */
-			tstamp.l_ui = JAN_1970 + (u_int32)last_timecode;
-			tstamp.l_uf = 0;
-
-			refclock_process_offset(pp, tstamp, pp->lastrec, pp->fudgetime1);
-
-			/*
-			 * The clock will blurt a timecode every second
-			 * but we only want one when polled.  If we
-			 * havn't been polled, bail out.
-			 */
-			if (!instance->polled)
-				break;
-			instance->polled = 0;
-
-			/*
-			 * It's a live one!  Remember this time.
-			 */
-
-			pp->lastref = pp->lastrec;
-			refclock_receive(peer);
-
-			/*
-			 * If we get here - what we got from the clock is
-			 * OK, so say so
-			 */
-			refclock_report(peer, CEVNT_NOMINAL);
-
-			/*
-			 * We have succeeded in answering the poll.
-			 * Turn off the flag and return
-			 */
-			instance->polled = 0;
 			break;
 
 		case JUPITER_O_GPOS:
@@ -655,7 +600,7 @@
 				break;
 			}
 
-			if ((cp = jupiter_parse_gpos(instance, sp)) != NULL) {
+			if ((cp = jupiter_parse_gpos(up, sp)) != NULL) {
 				jupiter_debug(peer, __func__,
 				    "gpos: %s", cp);
 				break;
@@ -681,16 +626,16 @@
 			msyslog(LOG_DEBUG,
 			    "jupiter_receive: %s chan ver %s, %s (%s)",
 			    ip->chans, ip->vers, ip->date, ip->opts);
-			if (instance->wantid)
-				instance->wantid = 0;
+			if (up->wantid)
+				up->wantid = 0;
 			else {
 				jupiter_debug(peer, __func__, "reset receiver");
-				jupiter_config(instance);
+				jupiter_config(up);
 				/*
 				 * Restore since jupiter_config() just
 				 * zeroed it
 				 */
-				instance->ssize = cc;
+				up->ssize = cc;
 			}
 			break;
 
@@ -699,144 +644,94 @@
 			    getshort(hp->id));
 			break;
 		}
-		instance->ssize -= cc;
-		if (instance->ssize < 0) {
+		up->ssize -= cc;
+		if (up->ssize < 0) {
 			fprintf(stderr, "jupiter_recv: negative ssize!\n");
 			abort();
-		} else if (instance->ssize > 0)
-			memcpy(instance->sbuf, (u_char *)instance->sbuf + cc, instance->ssize);
+		} else if (up->ssize > 0)
+			memcpy(up->sbuf, (u_char *)up->sbuf + cc, up->ssize);
 	}
 }
 
 static const char *
-jupiter_parse_t(struct instance *instance, u_short *sp)
+jupiter_parse_t(
+	struct instance * const up,
+	u_short *               sp,
+	l_fp               rcvtime
+	)
 {
-	struct tm *tm;
-	char *cp;
 	struct jpulse *jp;
 	u_int32 sweek;
-	time_t last_timecode;
 	u_short flags;
-
+	l_fp fofs;
+	
 	jp = (struct jpulse *)sp;
+	flags = getshort(jp->flags);
 
+	/* Toss if not designated "valid" by the gps.
+	 * !!NOTE!! do *not* kill data received so far!
+	 */
+	if ((flags & JUPITER_O_PULSE_VALID) == 0) {
+		refclock_report(up->peer, CEVNT_BADTIME);
+		return ("time mark not valid");
+	}
+
+	up->rcv_next = rcvtime; /* remember when this happened */
+	
 	/* The timecode is presented as seconds into the current GPS week */
 	sweek = DS2UI(jp->sweek) % WEEKSECS;
-
+	/* check if we have to apply the UTC offset ourselves */
+	if ((flags & JUPITER_O_PULSE_UTC) == 0) {
+		struct timespec tofs;
+		tofs.tv_sec  = getshort(jp->offs);
+		tofs.tv_nsec = DS2I(jp->offns);
+		fofs = tspec_intv_to_lfp(tofs);
+		L_NEG(&fofs);
+	} else {
+		ZERO(fofs);
+	}
+	
 	/*
 	 * If we don't know the current GPS week, calculate it from the
 	 * current time. (It's too bad they didn't include this
-	 * important value in the pulse message). We'd like to pick it
-	 * up from one of the other messages like gpos or chan but they
-	 * don't appear to be synchronous with time keeping and changes
-	 * too soon (something like 10 seconds before the new GPS
-	 * week).
+	 * important value in the pulse message).
+	 * 
+	 * So we pick the pivot value from the other messages like gpos
+	 * or chan if we can. Of course, the PULSE message can be in UTC
+	 * or GPS time scale, and the other messages are simply always
+	 * GPS time.
 	 *
-	 * If we already know the current GPS week, increment it when
-	 * we wrap into a new week.
+	 * But as long as the difference between the time stamps is less
+	 * than a half week, the unfolding of a week time is unambigeous
+	 * and well suited for the problem we have here. And we won't
+	 * see *that* many leap seconds, ever.
 	 */
-	if (instance->gweek == 0) {
-		if (!instance->gpos_gweek) {
-			return ("jupiter_parse_t: Unknown gweek");
-		}
-
-		instance->gweek = instance->gpos_gweek;
-
-		/*
-		 * Fix warps. GPOS has GPS time and PULSE has UTC.
-		 * Plus, GPOS need not be completely in synch with
-		 * the PPS signal.
-		 */
-		if (instance->gpos_sweek >= sweek) {
-			if ((instance->gpos_sweek - sweek) > WEEKSECS / 2)
-				++instance->gweek;
-		}
-		else {
-			if ((sweek - instance->gpos_sweek) > WEEKSECS / 2)
-				--instance->gweek;
-		}
+	if (up->piv_next.weeks) {
+		up->ref_next = gpscal_from_weektime2(
+			sweek, fofs, &up->piv_next);
+		up->piv_next = up->ref_next;
+	} else {
+		up->ref_next = gpscal_from_weektime1(
+			sweek, fofs, rcvtime);
 	}
-	else if (sweek == 0 && instance->lastsweek == WEEKSECS - 1) {
-		++instance->gweek;
-		jupiter_debug(instance->peer, __func__,
-		    "NEW gps week %u", instance->gweek);
-	}
+			
 
-	/*
-	 * See if the sweek stayed the same (this happens when there is
-	 * no pps pulse).
-	 *
-	 * Otherwise, look for time warps:
-	 *
-	 *   - we have stored at least one lastsweek and
-	 *   - the sweek didn't increase by one and
-	 *   - we didn't wrap to a new GPS week
-	 *
-	 * Then we warped.
-	 */
-	if (instance->lastsweek == sweek)
-		jupiter_debug(instance->peer, __func__,
-		    "gps sweek not incrementing (%d)",
-		    sweek);
-	else if (instance->lastsweek != 2 * WEEKSECS &&
-	    instance->lastsweek + 1 != sweek &&
-	    !(sweek == 0 && instance->lastsweek == WEEKSECS - 1))
-		jupiter_debug(instance->peer, __func__,
-		    "gps sweek jumped (was %d, now %d)",
-		    instance->lastsweek, sweek);
-	instance->lastsweek = sweek;
 
-	/* This timecode describes next pulse */
-	last_timecode = instance->timecode;
-	instance->timecode =
-	    GPS_EPOCH + (instance->gweek * WEEKSECS) + sweek;
-
-	if (last_timecode == 0)
-		/* XXX debugging */
-		jupiter_debug(instance->peer, __func__,
-		    "UTC <none> (gweek/sweek %u/%u)",
-		    instance->gweek, sweek);
-	else {
-		/* XXX debugging */
-		tm = gmtime(&last_timecode);
-		cp = asctime(tm);
-
-		jupiter_debug(instance->peer, __func__,
-		    "UTC %.24s (gweek/sweek %u/%u)",
-		    cp, instance->gweek, sweek);
-
-		/* Billboard last_timecode (which is now the current time) */
-		instance->peer->procptr->year   = tm->tm_year + 1900;
-		instance->peer->procptr->day    = tm->tm_yday + 1;
-		instance->peer->procptr->hour   = tm->tm_hour;
-		instance->peer->procptr->minute = tm->tm_min;
-		instance->peer->procptr->second = tm->tm_sec;
-	}
-
-	flags = getshort(jp->flags);
-
-	/* Toss if not designated "valid" by the gps */
-	if ((flags & JUPITER_O_PULSE_VALID) == 0) {
-		refclock_report(instance->peer, CEVNT_BADTIME);
-		return ("time mark not valid");
-	}
-
-	/* We better be sync'ed to UTC... */
-	if ((flags & JUPITER_O_PULSE_UTC) == 0) {
-		refclock_report(instance->peer, CEVNT_BADTIME);
-		return ("time mark not sync'ed to UTC");
-	}
-
 	return (NULL);
 }
 
 static const char *
-jupiter_parse_gpos(struct instance *instance, u_short *sp)
+jupiter_parse_gpos(
+	struct instance * const up,
+	u_short *               sp
+	)
 {
 	struct jgpos *jg;
-	time_t t;
-	struct tm *tm;
+	struct calendar	tref;
 	char *cp;
+	struct timespec tofs;
+	uint16_t	raw_week;
+	uint32_t	raw_secs;
 
 	jg = (struct jgpos *)sp;
 
@@ -845,31 +740,22 @@
 		 * Solution not valid. Use caution and refuse
 		 * to determine GPS week from this message.
 		 */
-		instance->gpos_gweek = 0;
-		instance->gpos_sweek = 0;
 		return ("Navigation solution not valid");
 	}
 
-	instance->gpos_sweek = DS2UI(jg->sweek);
-	instance->gpos_gweek = basedate_expand_gpsweek(getshort(jg->gweek));
+	raw_week = getshort(jg->gweek);
+	raw_secs = DS2UI(jg->sweek);
+	tofs.tv_sec  = 0;
+	tofs.tv_nsec = DS2UI(jg->nsweek);
+	up->piv_next = gpscal_from_gpsweek(raw_week, raw_secs,
+					   tspec_intv_to_lfp(tofs));
+	up->piv_hold = 60;
 
-	/* according to the protocol spec, the seconds-in-week cannot
-	 * exceed the nominal value: Is it really necessary to normalise
-	 * the seconds???
-	 */
-	while(instance->gpos_sweek >= WEEKSECS) {
-		instance->gpos_sweek -= WEEKSECS;
-		++instance->gpos_gweek;
-	}
-	instance->gweek = 0;
-
-	t = GPS_EPOCH + (instance->gpos_gweek * WEEKSECS) + instance->gpos_sweek;
-	tm = gmtime(&t);
-	cp = asctime(tm);
-
-	jupiter_debug(instance->peer, __func__,
-		"GPS %.24s (gweek/sweek %u/%u)",
-		cp, instance->gpos_gweek, instance->gpos_sweek);
+	gpscal_to_calendar(&tref, &up->piv_next);
+	cp = ntpcal_iso8601std(NULL, 0, &tref);
+	jupiter_debug(up->peer, __func__,
+		"GPS %s (gweek/sweek %hu/%u)",
+		      cp, (unsigned short)raw_week, (unsigned int)raw_secs);
 	return (NULL);
 }
 
@@ -906,7 +792,10 @@
 
 /* Checksum and transmit a message to the Jupiter */
 static char *
-jupiter_send(struct instance *instance, struct jheader *hp)
+jupiter_send(
+	struct instance * const up,
+	struct jheader *        hp
+	)
 {
 	u_int len, size;
 	ssize_t cc;
@@ -923,7 +812,7 @@
 		size += (len + 1) * sizeof(u_short);
 	}
 
-	if ((cc = write(instance->peer->procptr->io.fd, (char *)hp, size)) < 0) {
+	if ((cc = write(up->peer->procptr->io.fd, (char *)hp, size)) < 0) {
 		msnprintf(errstr, sizeof(errstr), "write: %m");
 		return (errstr);
 	} else if (cc != (int)size) {
@@ -947,8 +836,11 @@
 
 /* An interval of zero means to output on trigger */
 static void
-jupiter_reqmsg(struct instance *instance, u_int id,
-    u_int interval)
+jupiter_reqmsg(
+	struct instance * const up,
+	u_int                   id,
+	u_int             interval
+	)
 {
 	struct jheader *hp;
 	struct jrequest *rp;
@@ -959,8 +851,8 @@
 	rp = &reqmsg.jrequest;
 	rp->trigger = putshort(interval == 0);
 	rp->interval = putshort(interval);
-	if ((cp = jupiter_send(instance, hp)) != NULL)
-		jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
+	if ((cp = jupiter_send(up, hp)) != NULL)
+		jupiter_debug(up->peer, __func__, "%u: %s", id, cp);
 }
 
 /* Cancel periodic message output */
@@ -971,7 +863,10 @@
 };
 
 static void
-jupiter_canmsg(struct instance *instance, u_int id)
+jupiter_canmsg(
+	struct instance * const up,
+	u_int                   id
+	)
 {
 	struct jheader *hp;
 	char *cp;
@@ -978,8 +873,8 @@
 
 	hp = &canmsg;
 	hp->id = putshort(id);
-	if ((cp = jupiter_send(instance, hp)) != NULL)
-		jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
+	if ((cp = jupiter_send(up, hp)) != NULL)
+		jupiter_debug(up->peer, __func__, "%u: %s", id, cp);
 }
 
 /* Request a single message output */
@@ -990,7 +885,10 @@
 };
 
 static void
-jupiter_reqonemsg(struct instance *instance, u_int id)
+jupiter_reqonemsg(
+	struct instance * const up,
+	u_int                   id
+	)
 {
 	struct jheader *hp;
 	char *cp;
@@ -997,8 +895,8 @@
 
 	hp = &reqonemsg;
 	hp->id = putshort(id);
-	if ((cp = jupiter_send(instance, hp)) != NULL)
-		jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
+	if ((cp = jupiter_send(up, hp)) != NULL)
+		jupiter_debug(up->peer, __func__, "%u: %s", id, cp);
 }
 
 /* Set the platform dynamics */
@@ -1013,7 +911,10 @@
 };
 
 static void
-jupiter_platform(struct instance *instance, u_int platform)
+jupiter_platform(
+	struct instance * const up,
+	u_int             platform
+	)
 {
 	struct jheader *hp;
 	struct jplat *pp;
@@ -1022,8 +923,8 @@
 	hp = &platmsg.jheader;
 	pp = &platmsg.jplat;
 	pp->platform = putshort(platform);
-	if ((cp = jupiter_send(instance, hp)) != NULL)
-		jupiter_debug(instance->peer, __func__, "%u: %s", platform, cp);
+	if ((cp = jupiter_send(up, hp)) != NULL)
+		jupiter_debug(up->peer, __func__, "%u: %s", platform, cp);
 }
 
 /* Checksum "len" shorts */
@@ -1042,7 +943,9 @@
 
 /* Return the size of the next message (or zero if we don't have it all yet) */
 static int
-jupiter_recv(struct instance *instance)
+jupiter_recv(
+	struct instance * const up
+	)
 {
 	int n, len, size, cc;
 	struct jheader *hp;
@@ -1051,22 +954,22 @@
 
 	/* Must have at least a header's worth */
 	cc = sizeof(*hp);
-	size = instance->ssize;
+	size = up->ssize;
 	if (size < cc)
 		return (0);
 
 	/* Search for the sync short if missing */
-	sp = instance->sbuf;
+	sp = up->sbuf;
 	hp = (struct jheader *)sp;
 	if (getshort(hp->sync) != JUPITER_SYNC) {
 		/* Wasn't at the front, sync up */
-		jupiter_debug(instance->peer, __func__, "syncing");
+		jupiter_debug(up->peer, __func__, "syncing");
 		bp = (u_char *)sp;
 		n = size;
 		while (n >= 2) {
 			if (bp[0] != (JUPITER_SYNC & 0xff)) {
 				/*
-				jupiter_debug(instance->peer, __func__,
+				jupiter_debug(up->peer, __func__,
 				    "{0x%x}", bp[0]);
 				*/
 				++bp;
@@ -1076,7 +979,7 @@
 			if (bp[1] == ((JUPITER_SYNC >> 8) & 0xff))
 				break;
 			/*
-			jupiter_debug(instance->peer, __func__,
+			jupiter_debug(up->peer, __func__,
 			    "{0x%x 0x%x}", bp[0], bp[1]);
 			*/
 			bp += 2;
@@ -1083,13 +986,13 @@
 			n -= 2;
 		}
 		/*
-		jupiter_debug(instance->peer, __func__, "\n");
+		jupiter_debug(up->peer, __func__, "\n");
 		*/
 		/* Shuffle data to front of input buffer */
 		if (n > 0)
 			memcpy(sp, bp, n);
 		size = n;
-		instance->ssize = size;
+		up->ssize = size;
 		if (size < cc || hp->sync != JUPITER_SYNC)
 			return (0);
 	}
@@ -1096,9 +999,9 @@
 
 	if (jupiter_cksum(sp, (cc / sizeof(u_short) - 1)) !=
 	    getshort(hp->hsum)) {
-	    jupiter_debug(instance->peer, __func__, "bad header checksum!");
+	    jupiter_debug(up->peer, __func__, "bad header checksum!");
 		/* This is drastic but checksum errors should be rare */
-		instance->ssize = 0;
+		up->ssize = 0;
 		return (0);
 	}
 
@@ -1113,10 +1016,10 @@
 		/* Check payload checksum */
 		sp = (u_short *)(hp + 1);
 		if (jupiter_cksum(sp, len) != getshort(sp[len])) {
-			jupiter_debug(instance->peer,
+			jupiter_debug(up->peer,
 			    __func__, "bad payload checksum!");
 			/* This is drastic but checksum errors should be rare */
-			instance->ssize = 0;
+			up->ssize = 0;
 			return (0);
 		}
 		cc += n;
--- contrib/ntp/ntpd/refclock_nmea.c.orig
+++ contrib/ntp/ntpd/refclock_nmea.c
@@ -38,7 +38,7 @@
 #include "ntp_unixtime.h"
 #include "ntp_refclock.h"
 #include "ntp_stdlib.h"
-#include "ntp_calendar.h"
+#include "ntp_calgps.h"
 #include "timespecops.h"
 
 #ifdef HAVE_PPSAPI
@@ -67,33 +67,34 @@
  * GPS sentences other than RMC (the default) may be enabled by setting
  * the relevent bits of 'mode' in the server configuration line
  * server 127.127.20.x mode X
- * 
+ *
  * bit 0 - enables RMC (1)
  * bit 1 - enables GGA (2)
  * bit 2 - enables GLL (4)
  * bit 3 - enables ZDA (8) - Standard Time & Date
- * bit 3 - enables ZDG (8) - Accord GPS Clock's custom sentence with GPS time 
+ * bit 3 - enables ZDG (8) - Accord GPS Clock's custom sentence with GPS time
  *			     very close to standard ZDA
- * 
+ *
  * Multiple sentences may be selected except when ZDG/ZDA is selected.
  *
  * bit 4/5/6 - selects the baudrate for serial port :
- *		0 for 4800 (default) 
- *		1 for 9600 
- *		2 for 19200 
- *		3 for 38400 
- *		4 for 57600 
- *		5 for 115200 
+ *		0 for 4800 (default)
+ *		1 for 9600
+ *		2 for 19200
+ *		3 for 38400
+ *		4 for 57600
+ *		5 for 115200
  */
 #define NMEA_MESSAGE_MASK	0x0000FF0FU
 #define NMEA_BAUDRATE_MASK	0x00000070U
 #define NMEA_BAUDRATE_SHIFT	4
 
-#define NMEA_DELAYMEAS_MASK	0x80
+#define NMEA_DELAYMEAS_MASK	0x00000080U
 #define NMEA_EXTLOG_MASK	0x00010000U
-#define NMEA_DATETRUST_MASK	0x02000000U
+#define NMEA_QUIETPPS_MASK	0x00020000U
+#define NMEA_DATETRUST_MASK	0x00040000U
 
-#define NMEA_PROTO_IDLEN	5	/* tag name must be at least 5 chars */
+#define NMEA_PROTO_IDLEN	4	/* tag name must be at least 4 chars */
 #define NMEA_PROTO_MINLEN	6	/* min chars in sentence, excluding CS */
 #define NMEA_PROTO_MAXLEN	80	/* max chars in sentence, excluding CS */
 #define NMEA_PROTO_FIELDS	32	/* not official; limit on fields per record */
@@ -110,24 +111,24 @@
  * $GPRMC,232418.19,A,3513.8386,S,14900.7853,E,00.0,000.0,121199,12.,E*77
  *
  * Defining GPZDA to support Standard Time & Date
- * sentence. The sentence has the following format 
- *  
+ * sentence. The sentence has the following format
+ *
  *  $--ZDA,HHMMSS.SS,DD,MM,YYYY,TH,TM,*CS<CR><LF>
  *
- *  Apart from the familiar fields, 
+ *  Apart from the familiar fields,
  *  'TH'    Time zone Hours
  *  'TM'    Time zone Minutes
  *
- * Defining GPZDG to support Accord GPS Clock's custom NMEA 
- * sentence. The sentence has the following format 
- *  
+ * Defining GPZDG to support Accord GPS Clock's custom NMEA
+ * sentence. The sentence has the following format
+ *
  *  $GPZDG,HHMMSS.S,DD,MM,YYYY,AA.BB,V*CS<CR><LF>
  *
  *  It contains the GPS timestamp valid for next PPS pulse.
- *  Apart from the familiar fields, 
- *  'AA.BB' denotes the signal strength( should be < 05.00 ) 
- *  'V'	    denotes the GPS sync status : 
- *	   '0' indicates INVALID time, 
+ *  Apart from the familiar fields,
+ *  'AA.BB' denotes the signal strength( should be < 05.00 )
+ *  'V'	    denotes the GPS sync status :
+ *	   '0' indicates INVALID time,
  *	   '1' indicates accuracy of +/-20 ms
  *	   '2' indicates accuracy of +/-100 ns
  *
@@ -151,6 +152,8 @@
 #define	SPEED232	B4800	/* uart speed (4800 bps) */
 #define	PRECISION	(-9)	/* precision assumed (about 2 ms) */
 #define	PPS_PRECISION	(-20)	/* precision assumed (about 1 us) */
+#define	DATE_HOLD	16	/* seconds to hold on provided GPS date */
+#define	DATE_HLIM	4	/* when do we take ANY date format */
 #define	REFID		"GPS\0"	/* reference id */
 #define	DESCRIPTION	"NMEA GPS Clock" /* who we are */
 #ifndef O_NOCTTY
@@ -181,7 +184,8 @@
  */
 #define NMEA_GPZDG	4
 #define NMEA_PGRMF	5
-#define NMEA_ARRAY_SIZE (NMEA_PGRMF + 1)
+#define NMEA_PUBX04	6
+#define NMEA_ARRAY_SIZE (NMEA_PUBX04 + 1)
 
 /*
  * Sentence selection mode bits
@@ -191,6 +195,7 @@
 #define USE_GPGLL		0x00000004u
 #define USE_GPZDA		0x00000008u
 #define USE_PGRMF		0x00000100u
+#define USE_PUBX04		0x00000200u
 
 /* mapping from sentence index to controlling mode bit */
 static const u_int32 sentence_mode[NMEA_ARRAY_SIZE] =
@@ -200,7 +205,8 @@
 	USE_GPGLL,
 	USE_GPZDA,
 	USE_GPZDA,
-	USE_PGRMF
+	USE_PGRMF,
+	USE_PUBX04
 };
 
 /* date formats we support */
@@ -209,6 +215,15 @@
 	DATE_3_DDMMYYYY	/* use 3 fields with 4-digit year */
 };
 
+/* date type */
+enum date_type {
+	DTYP_NONE,
+	DTYP_Y2D,	/* 2-digit year */
+	DTYP_W10B,	/* 10-bit week in GPS epoch */
+	DTYP_Y4D,	/* 4-digit (full) year */
+	DTYP_WEXT	/* extended week in GPS epoch */
+};
+
 /* results for 'field_init()'
  *
  * Note: If a checksum is present, the checksum test must pass OK or the
@@ -222,18 +237,22 @@
 /*
  * Unit control structure
  */
+struct refclock_atom;
+typedef struct refclock_atom TAtomUnit;
 typedef struct {
-#ifdef HAVE_PPSAPI
-	struct refclock_atom atom; /* PPSAPI structure */
-	int	ppsapi_fd;	/* fd used with PPSAPI */
-	u_char	ppsapi_tried;	/* attempt PPSAPI once */
-	u_char	ppsapi_lit;	/* time_pps_create() worked */
-	u_char	ppsapi_gate;	/* system is on PPS */
-#endif /* HAVE_PPSAPI */
-	u_char  gps_time;	/* use GPS time, not UTC */
-	u_short century_cache;	/* cached current century */
-	l_fp	last_reftime;	/* last processed reference stamp */
-	short 	epoch_warp;	/* last epoch warp, for logging */
+#   ifdef HAVE_PPSAPI
+	TAtomUnit	atom;		/* PPSAPI structure */
+	int		ppsapi_fd;	/* fd used with PPSAPI */
+	u_char		ppsapi_tried;	/* attempt PPSAPI once */
+	u_char		ppsapi_lit;	/* time_pps_create() worked */
+#   endif /* HAVE_PPSAPI */
+	uint16_t	rcvtout;	/* one-shot for sample expiration */
+	u_char		ppsapi_gate;	/* system is on PPS */
+	u_char  	gps_time;	/* use GPS time, not UTC */
+	l_fp		last_reftime;	/* last processed reference stamp */
+	TNtpDatum	last_gpsdate;	/* last processed split date/time */
+	u_short		hold_gpsdate;	/* validity ticker for above */
+	u_short		type_gpsdate;	/* date info type for above */
 	/* tally stats, reset each poll cycle */
 	struct
 	{
@@ -243,10 +262,14 @@
 		u_int malformed;  /* Bad checksum, invalid date or time */
 		u_int filtered;   /* mode bits, not GPZDG, same second */
 		u_int pps_used;
-	}	
+	}
 		tally;
 	/* per sentence checksum seen flag */
-	u_char	cksum_type[NMEA_ARRAY_SIZE];
+	u_char		cksum_type[NMEA_ARRAY_SIZE];
+
+	/* line assembly buffer (NMEAD support) */
+	u_short	lb_len;
+	char	lb_buf[BMAX];	/* assembly buffer */
 } nmea_unit;
 
 /*
@@ -260,34 +283,15 @@
 } nmea_data;
 
 /*
- * NMEA gps week/time information
- * This record contains the number of weeks since 1980-01-06 modulo
- * 1024, the seconds elapsed since start of the week, and the number of
- * leap seconds that are the difference between GPS and UTC time scale.
- */
-typedef struct {
-	u_int32 wt_time;	/* seconds since weekstart */
-	u_short wt_week;	/* week number */
-	short	wt_leap;	/* leap seconds */
-} gps_weektm;
-
-/*
- * The GPS week time scale starts on Sunday, 1980-01-06. We need the
- * rata die number of this day.
- */
-#ifndef DAY_GPS_STARTS
-#define DAY_GPS_STARTS 722820
-#endif
-
-/*
  * Function prototypes
  */
-static	void	nmea_init	(void);
 static	int	nmea_start	(int, struct peer *);
 static	void	nmea_shutdown	(int, struct peer *);
 static	void	nmea_receive	(struct recvbuf *);
 static	void	nmea_poll	(int, struct peer *);
+static	void	nmea_procrec	(struct peer *, l_fp);
 #ifdef HAVE_PPSAPI
+static	double	tabsdiffd	(l_fp, l_fp);
 static	void	nmea_control	(int, const struct refclockstat *,
 				 struct refclockstat *, struct peer *);
 #define		NMEA_CONTROL	nmea_control
@@ -302,26 +306,17 @@
 static void	field_wipe	(nmea_data * data, ...);
 static u_char	parse_qual	(nmea_data * data, int idx,
 				 char tag, int inv);
-static int	parse_time	(struct calendar * jd, long * nsec,
+static int	parse_time	(TCivilDate * jd, l_fp * fofs,
 				 nmea_data *, int idx);
-static int	parse_date	(struct calendar *jd, nmea_data*,
+static int	parse_date	(TCivilDate * jd, nmea_data *,
 				 int idx, enum date_fmt fmt);
-static int	parse_weekdata	(gps_weektm *, nmea_data *,
+static int	parse_gpsw	(TGpsDatum *, nmea_data *,
 				 int weekidx, int timeidx, int leapidx);
-/* calendar / date helpers */
-static int	unfold_day	(struct calendar * jd, u_int32 rec_ui);
-static int	unfold_century	(struct calendar * jd, u_int32 rec_ui);
-static int	gpsfix_century	(struct calendar * jd, const gps_weektm * wd,
-				 u_short * ccentury);
-static l_fp     eval_gps_time	(struct peer * peer, const struct calendar * gpst,
-				 const struct timespec * gpso, const l_fp * xrecv);
 
 static int	nmead_open	(const char * device);
-static void     save_ltc        (struct refclockproc * const, const char * const,
-				 size_t);
 
 /*
- * If we want the driver to ouput sentences, too: re-enable the send
+ * If we want the driver to output sentences, too: re-enable the send
  * support functions by defining NMEA_WRITE_SUPPORT to non-zero...
  */
 #if NMEA_WRITE_SUPPORT
@@ -335,9 +330,6 @@
 
 #endif /* NMEA_WRITE_SUPPORT */
 
-static int32_t g_gpsMinBase;
-static int32_t g_gpsMinYear;
-
 /*
  * -------------------------------------------------------------------
  * Transfer vector
@@ -348,46 +340,12 @@
 	nmea_shutdown,		/* shut down driver */
 	nmea_poll,		/* transmit poll message */
 	NMEA_CONTROL,		/* fudge control */
-	nmea_init,		/* initialize driver */
+	noentry,		/* initialize driver */
 	noentry,		/* buginfo */
 	nmea_timer		/* called once per second */
 };
 
-/*
- * -------------------------------------------------------------------
- * nmea_init - initialise data
- *
- * calculates a few runtime constants that cannot be made compile time
- * constants.
- * -------------------------------------------------------------------
- */
-static void
-nmea_init(void)
-{
-	struct calendar date;
 
-	/* - calculate min. base value for GPS epoch & century unfolding 
-	 * This assumes that the build system was roughly in sync with
-	 * the world, and that really synchronising to a time before the
-	 * program was created would be unsafe or insane. If the build
-	 * date cannot be stablished, at least use the start of GPS
-	 * (1980-01-06) as minimum, because GPS can surely NOT
-	 * synchronise beyond it's own big bang. We add a little safety
-	 * margin for the fuzziness of the build date, which is in an
-	 * undefined time zone. */
-	if (ntpcal_get_build_date(&date))
-		g_gpsMinBase = ntpcal_date_to_rd(&date) - 2;
-	else
-		g_gpsMinBase = 0;
-
-	if (g_gpsMinBase < DAY_GPS_STARTS)
-		g_gpsMinBase = DAY_GPS_STARTS;
-
-	ntpcal_rd_to_date(&date, g_gpsMinBase);
-	g_gpsMinYear  = date.year;
-	g_gpsMinBase -= DAY_NTP_STARTS;
-}
-
 /*
  * -------------------------------------------------------------------
  * nmea_start - open the GPS devices and initialize data for processing
@@ -432,18 +390,18 @@
 		baudrate = B38400;
 		baudtext = "38400";
 		break;
-#ifdef B57600
+#   ifdef B57600
 	case 4:
 		baudrate = B57600;
 		baudtext = "57600";
 		break;
-#endif
-#ifdef B115200
+#   endif
+#   ifdef B115200
 	case 5:
 		baudrate = B115200;
 		baudtext = "115200";
 		break;
-#endif
+#   endif
 	default:
 		baudrate = SPEED232;
 		baudtext = "4800 (fallback)";
@@ -458,11 +416,12 @@
 	pp->io.datalen = 0;
 	/* force change detection on first valid message */
 	memset(&up->last_reftime, 0xFF, sizeof(up->last_reftime));
+	memset(&up->last_gpsdate, 0x00, sizeof(up->last_gpsdate));
 	/* force checksum on GPRMC, see below */
 	up->cksum_type[NMEA_GPRMC] = CHECK_CSVALID;
-#ifdef HAVE_PPSAPI
+#   ifdef HAVE_PPSAPI
 	up->ppsapi_fd = -1;
-#endif
+#   endif /* HAVE_PPSAPI */
 	ZERO(up->tally);
 
 	/* Initialize miscellaneous variables */
@@ -490,11 +449,10 @@
 	return io_addclock(&pp->io) != 0;
 }
 
-
 /*
  * -------------------------------------------------------------------
  * nmea_shutdown - shut down a GPS clock
- * 
+ *
  * NOTE this routine is called after nmea_start() returns failure,
  * as well as during a normal shutdown due to ntpq :config unpeer.
  * -------------------------------------------------------------------
@@ -511,12 +469,12 @@
 	UNUSED_ARG(unit);
 
 	if (up != NULL) {
-#ifdef HAVE_PPSAPI
+#	    ifdef HAVE_PPSAPI
 		if (up->ppsapi_lit)
 			time_pps_destroy(up->atom.handle);
 		if (up->ppsapi_tried && up->ppsapi_fd != pp->io.fd)
 			close(up->ppsapi_fd);
-#endif
+#	    endif
 		free(up);
 	}
 	pp->unitptr = (caddr_t)NULL;
@@ -544,7 +502,7 @@
 
 	char   device[32];
 	size_t devlen;
-	
+
 	UNUSED_ARG(in_st);
 	UNUSED_ARG(out_st);
 
@@ -570,7 +528,7 @@
 				refnumtoa(&peer->srcadr));
 		}
 		if (-1 == up->ppsapi_fd)
-			up->ppsapi_fd = pp->io.fd;	
+			up->ppsapi_fd = pp->io.fd;
 		if (refclock_ppsapi(up->ppsapi_fd, &up->atom)) {
 			/* use the PPS API for our own purposes now. */
 			up->ppsapi_lit = refclock_params(
@@ -580,10 +538,10 @@
 				time_pps_destroy(up->atom.handle);
 				msyslog(LOG_WARNING,
 					"%s set PPSAPI params fails",
-					refnumtoa(&peer->srcadr));				
+					refnumtoa(&peer->srcadr));
 			}
 			/* note: the PPS I/O handle remains valid until
-			 * flag1 is cleared or the clock is shut down. 
+			 * flag1 is cleared or the clock is shut down.
 			 */
 		} else {
 			msyslog(LOG_WARNING,
@@ -593,7 +551,7 @@
 	}
 
 	/* shut down PPS API if activated */
-	if (!(CLK_FLAG1 & pp->sloppyclockflag) && up->ppsapi_tried) {
+	if ( !(CLK_FLAG1 & pp->sloppyclockflag) && up->ppsapi_tried) {
 		/* shutdown PPS API */
 		if (up->ppsapi_lit)
 			time_pps_destroy(up->atom.handle);
@@ -612,12 +570,11 @@
 		peer->precision = PRECISION;
 	}
 }
-#endif	/* HAVE_PPSAPI */
+#endif /* HAVE_PPSAPI */
 
 /*
  * -------------------------------------------------------------------
  * nmea_timer - called once per second
- *		this only polls (older?) Oncore devices now
  *
  * Usually 'nmea_receive()' can get a timestamp every second, but at
  * least one Motorola unit needs prompting each time. Doing so in
@@ -624,6 +581,9 @@
  * 'nmea_poll()' gives only one sample per poll cycle, which actually
  * defeats the purpose of the median filter. Polling once per second
  * seems a much better idea.
+ *
+ * Also takes care of sample expiration if the receiver fails to
+ * provide new input data.
  * -------------------------------------------------------------------
  */
 static void
@@ -632,138 +592,36 @@
 	struct peer * peer
 	)
 {
-#if NMEA_WRITE_SUPPORT
-    
 	struct refclockproc * const pp = peer->procptr;
+	nmea_unit	    * const up = (nmea_unit *)pp->unitptr;
 
 	UNUSED_ARG(unit);
 
+#   if NMEA_WRITE_SUPPORT
+
 	if (-1 != pp->io.fd) /* any mode bits to evaluate here? */
 		gps_send(pp->io.fd, "$PMOTG,RMC,0000*1D\r\n", peer);
-#else
-	
-	UNUSED_ARG(unit);
-	UNUSED_ARG(peer);
-	
-#endif /* NMEA_WRITE_SUPPORT */
-}
 
-#ifdef HAVE_PPSAPI
-/*
- * -------------------------------------------------------------------
- * refclock_ppsrelate(...) -- correlate with PPS edge
- *
- * This function is used to correlate a receive time stamp and a
- * reference time with a PPS edge time stamp. It applies the necessary
- * fudges (fudge1 for PPS, fudge2 for receive time) and then tries to
- * move the receive time stamp to the corresponding edge. This can warp
- * into future, if a transmission delay of more than 500ms is not
- * compensated with a corresponding fudge time2 value, because then the
- * next PPS edge is nearer than the last. (Similiar to what the PPS ATOM
- * driver does, but we deal with full time stamps here, not just phase
- * shift information.) Likewise, a negative fudge time2 value must be
- * used if the reference time stamp correlates with the *following* PPS
- * pulse.
- *
- * Note that the receive time fudge value only needs to move the receive
- * stamp near a PPS edge but that close proximity is not required;
- * +/-100ms precision should be enough. But since the fudge value will
- * probably also be used to compensate the transmission delay when no
- * PPS edge can be related to the time stamp, it's best to get it as
- * close as possible.
- *
- * It should also be noted that the typical use case is matching to the
- * preceeding edge, as most units relate their sentences to the current
- * second.
- *
- * The function returns PPS_RELATE_NONE (0) if no PPS edge correlation
- * can be fixed; PPS_RELATE_EDGE (1) when a PPS edge could be fixed, but
- * the distance to the reference time stamp is too big (exceeds
- * +/-400ms) and the ATOM driver PLL cannot be used to fix the phase;
- * and PPS_RELATE_PHASE (2) when the ATOM driver PLL code can be used.
- *
- * On output, the receive time stamp is replaced with the corresponding
- * PPS edge time if a fix could be made; the PPS fudge is updated to
- * reflect the proper fudge time to apply. (This implies that
- * 'refclock_process_offset()' must be used!)
- * -------------------------------------------------------------------
- */
-#define PPS_RELATE_NONE	 0	/* no pps correlation possible	  */
-#define PPS_RELATE_EDGE	 1	/* recv time fixed, no phase lock */
-#define PPS_RELATE_PHASE 2	/* recv time fixed, phase lock ok */
+#   endif /* NMEA_WRITE_SUPPORT */
 
-static int
-refclock_ppsrelate(
-	const struct refclockproc  * pp	    ,	/* for sanity	  */
-	const struct refclock_atom * ap	    ,	/* for PPS io	  */
-	const l_fp		   * reftime ,
-	l_fp			   * rd_stamp,	/* i/o read stamp */
-	double			     pp_fudge,	/* pps fudge	  */
-	double			   * rd_fudge	/* i/o read fudge */
-	)
-{
-	pps_info_t	pps_info;
-	struct timespec timeout;
-	l_fp		pp_stamp, pp_delta;
-	double		delta, idelta;
+	/* receive timeout occurred? */
+	if (up->rcvtout) {
+		--up->rcvtout;
+	} else if (pp->codeproc != pp->coderecv) {
+		/* expire one (the oldest) sample, if any */
+		refclock_samples_expire(pp, 1);
+		/* reset message assembly buffer */
+		up->lb_buf[0] = '\0';
+		up->lb_len    = 0;
+	}
 
-	if (pp->leap == LEAP_NOTINSYNC)
-		return PPS_RELATE_NONE; /* clock is insane, no chance */
-
-	ZERO(timeout);
-	ZERO(pps_info);
-	if (time_pps_fetch(ap->handle, PPS_TSFMT_TSPEC,
-			   &pps_info, &timeout) < 0)
-		return PPS_RELATE_NONE; /* can't get time stamps */
-
-	/* get last active PPS edge before receive */
-	if (ap->pps_params.mode & PPS_CAPTUREASSERT)
-		timeout = pps_info.assert_timestamp;
-	else if (ap->pps_params.mode & PPS_CAPTURECLEAR)
-		timeout = pps_info.clear_timestamp;
-	else
-		return PPS_RELATE_NONE; /* WHICH edge, please?!? */
-
-	/* get delta between receive time and PPS time */
-	pp_stamp = tspec_stamp_to_lfp(timeout);
-	pp_delta = *rd_stamp;
-	L_SUB(&pp_delta, &pp_stamp);
-	LFPTOD(&pp_delta, delta);
-	delta += pp_fudge - *rd_fudge;
-	if (fabs(delta) > 1.5)
-		return PPS_RELATE_NONE; /* PPS timeout control */
-	
-	/* eventually warp edges, check phase */
-	idelta	  = floor(delta + 0.5);
-	pp_fudge -= idelta;
-	delta	 -= idelta;
-	if (fabs(delta) > 0.45)
-		return PPS_RELATE_NONE; /* dead band control */
-
-	/* we actually have a PPS edge to relate with! */
-	*rd_stamp = pp_stamp;
-	*rd_fudge = pp_fudge;
-
-	/* if whole system out-of-sync, do not try to PLL */
-	if (sys_leap == LEAP_NOTINSYNC)
-		return PPS_RELATE_EDGE; /* cannot PLL with atom code */
-
-	/* check against reftime if ATOM PLL can be used */
-	pp_delta = *reftime;
-	L_SUB(&pp_delta, &pp_stamp);
-	LFPTOD(&pp_delta, delta);
-	delta += pp_fudge;
-	if (fabs(delta) > 0.45)
-		return PPS_RELATE_EDGE; /* cannot PLL with atom code */
-
-	/* all checks passed, gets an AAA rating here! */
-	return PPS_RELATE_PHASE; /* can PLL with atom code */
+	if (up->hold_gpsdate && (--up->hold_gpsdate < DATE_HLIM))
+		up->type_gpsdate = DTYP_NONE;
 }
-#endif	/* HAVE_PPSAPI */
 
 /*
  * -------------------------------------------------------------------
- * nmea_receive - receive data from the serial interface
+ * nmea_procrec - receive data from the serial interface
  *
  * This is the workhorse for NMEA data evaluation:
  *
@@ -771,61 +629,64 @@
  *   NMEA sentences
  * + it checks whether a sentence is known and to be used
  * + it parses the time and date data from the NMEA data string and
- *   augments the missing bits. (century in dat, whole date, ...)
+ *   augments the missing bits. (century in date, whole date, ...)
  * + it rejects data that is not from the first accepted sentence in a
  *   burst
  * + it eventually replaces the receive time with the PPS edge time.
  * + it feeds the data to the internal processing stages.
+ *
+ * This function assumes a non-empty line in the unit line buffer.
  * -------------------------------------------------------------------
  */
 static void
-nmea_receive(
-	struct recvbuf * rbufp
+nmea_procrec(
+	struct peer * const	peer,
+	l_fp 	  		rd_timestamp
 	)
 {
-	/* declare & init control structure ptrs */
-	struct peer	    * const peer = rbufp->recv_peer;
+	/* declare & init control structure pointers */
 	struct refclockproc * const pp = peer->procptr;
 	nmea_unit	    * const up = (nmea_unit*)pp->unitptr;
 
 	/* Use these variables to hold data until we decide its worth keeping */
 	nmea_data rdata;
-	char 	  rd_lastcode[BMAX];
-	l_fp 	  rd_timestamp, rd_reftime;
-	int	  rd_lencode;
-	double	  rd_fudge;
+	l_fp 	  rd_reftime;
 
 	/* working stuff */
-	struct calendar date;	/* to keep & convert the time stamp */
-	struct timespec tofs;	/* offset to full-second reftime */
-	gps_weektm      gpsw;	/* week time storage */
+	TCivilDate	date;	/* to keep & convert the time stamp */
+	TGpsDatum	wgps;	/* week time storage */
+	TNtpDatum	dntp;
+	l_fp		tofs;	/* offset to full-second reftime */
 	/* results of sentence/date/time parsing */
 	u_char		sentence;	/* sentence tag */
 	int		checkres;
+	int		warp;		/* warp to GPS base date */
 	char *		cp;
-	int		rc_date;
-	int		rc_time;
+	int		rc_date, rc_time;
+	u_short		rc_dtyp;
+#   ifdef HAVE_PPSAPI
+	int		withpps = 0;
+#   endif /* HAVE_PPSAPI */
 
 	/* make sure data has defined pristine state */
 	ZERO(tofs);
 	ZERO(date);
-	ZERO(gpsw);
+	ZERO(wgps);
+	ZERO(dntp);
 
-	/* 
-	 * Read the timecode and timestamp, then initialise field
+	/*
+	 * Read the timecode and timestamp, then initialize field
 	 * processing. The <CR><LF> at the NMEA line end is translated
 	 * to <LF><LF> by the terminal input routines on most systems,
 	 * and this gives us one spurious empty read per record which we
 	 * better ignore silently.
 	 */
-	rd_lencode = refclock_gtlin(rbufp, rd_lastcode,
-				    sizeof(rd_lastcode), &rd_timestamp);
-	checkres = field_init(&rdata, rd_lastcode, rd_lencode);
+	checkres = field_init(&rdata, up->lb_buf, up->lb_len);
 	switch (checkres) {
 
 	case CHECK_INVALID:
 		DPRINTF(1, ("%s invalid data: '%s'\n",
-			refnumtoa(&peer->srcadr), rd_lastcode));
+			refnumtoa(&peer->srcadr), up->lb_buf));
 		refclock_report(peer, CEVNT_BADREPLY);
 		return;
 
@@ -834,13 +695,13 @@
 
 	default:
 		DPRINTF(1, ("%s gpsread: %d '%s'\n",
-			refnumtoa(&peer->srcadr), rd_lencode,
-			rd_lastcode));
+			refnumtoa(&peer->srcadr), up->lb_len,
+			up->lb_buf));
 		break;
 	}
 	up->tally.total++;
 
-	/* 
+	/*
 	 * --> below this point we have a valid NMEA sentence <--
 	 *
 	 * Check sentence name. Skip first 2 chars (talker ID) in most
@@ -859,8 +720,10 @@
 		sentence = NMEA_GPZDA;
 	else if (strncmp(cp + 2, "ZDG,", 4) == 0)
 		sentence = NMEA_GPZDG;
-	else if (strncmp(cp,   "PGRMF,", 6) == 0) 
+	else if (strncmp(cp,   "PGRMF,", 6) == 0)
 		sentence = NMEA_PGRMF;
+	else if (strncmp(cp,   "PUBX,04,", 8) == 0)
+		sentence = NMEA_PUBX04;
 	else
 		return;	/* not something we know about */
 
@@ -868,10 +731,10 @@
 	if (peer->ttl & NMEA_DELAYMEAS_MASK) {
 		mprintf_clock_stats(&peer->srcadr, "delay %0.6f %.*s",
 			 ldexp(rd_timestamp.l_uf, -32),
-			 (int)(strchr(rd_lastcode, ',') - rd_lastcode),
-			 rd_lastcode);
+			 (int)(strchr(up->lb_buf, ',') - up->lb_buf),
+			 up->lb_buf);
 	}
-	
+
 	/* See if I want to process this message type */
 	if ((peer->ttl & NMEA_MESSAGE_MASK) &&
 	    !(peer->ttl & sentence_mode[sentence])) {
@@ -879,7 +742,7 @@
 		return;
 	}
 
-	/* 
+	/*
 	 * make sure it came in clean
 	 *
 	 * Apparently, older NMEA specifications (which are expensive)
@@ -900,7 +763,7 @@
 		up->cksum_type[sentence] = (u_char)checkres;
 	} else {
 		DPRINTF(1, ("%s checksum missing: '%s'\n",
-			refnumtoa(&peer->srcadr), rd_lastcode));
+			refnumtoa(&peer->srcadr), up->lb_buf));
 		refclock_report(peer, CEVNT_BADREPLY);
 		up->tally.malformed++;
 		return;
@@ -910,36 +773,48 @@
 	 * $GPZDG provides GPS time not UTC, and the two mix poorly.
 	 * Once have processed a $GPZDG, do not process any further UTC
 	 * sentences (all but $GPZDG currently).
-	 */ 
-	if (up->gps_time && NMEA_GPZDG != sentence) {
-		up->tally.filtered++;
-		return;
+	 */
+	if (sentence == NMEA_GPZDG) {
+		if (!up->gps_time) {
+			msyslog(LOG_INFO,
+				"%s using GPS time as if it were UTC",
+				refnumtoa(&peer->srcadr));
+			up->gps_time = 1;
+		}
+	} else {
+		if (up->gps_time) {
+			up->tally.filtered++;
+			return;
+		}
 	}
 
 	DPRINTF(1, ("%s processing %d bytes, timecode '%s'\n",
-		refnumtoa(&peer->srcadr), rd_lencode, rd_lastcode));
+		refnumtoa(&peer->srcadr), up->lb_len, up->lb_buf));
 
 	/*
 	 * Grab fields depending on clock string type and possibly wipe
 	 * sensitive data from the last timecode.
 	 */
-	switch (sentence) {
+	rc_date = -1;	/* assume we have to do day-time mapping */
+	rc_dtyp = DTYP_NONE;
+       	switch (sentence) {
 
 	case NMEA_GPRMC:
 		/* Check quality byte, fetch data & time */
-		rc_time	 = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+		rc_time	 = parse_time(&date, &tofs, &rdata, 1);
 		pp->leap = parse_qual(&rdata, 2, 'A', 0);
-		rc_date	 = parse_date(&date, &rdata, 9, DATE_1_DDMMYY)
-			&& unfold_century(&date, rd_timestamp.l_ui);
-		if (CLK_FLAG4 & pp->sloppyclockflag)
+		if (up->type_gpsdate <= DTYP_Y2D) {
+			rc_date	= parse_date(&date, &rdata, 9, DATE_1_DDMMYY);
+			rc_dtyp = DTYP_Y2D;
+		}
+ 		if (CLK_FLAG4 & pp->sloppyclockflag)
 			field_wipe(&rdata, 3, 4, 5, 6, -1);
 		break;
 
 	case NMEA_GPGGA:
 		/* Check quality byte, fetch time only */
-		rc_time	 = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+		rc_time	 = parse_time(&date, &tofs, &rdata, 1);
 		pp->leap = parse_qual(&rdata, 6, '0', 1);
-		rc_date	 = unfold_day(&date, rd_timestamp.l_ui);
 		if (CLK_FLAG4 & pp->sloppyclockflag)
 			field_wipe(&rdata, 2, 4, -1);
 		break;
@@ -946,91 +821,150 @@
 
 	case NMEA_GPGLL:
 		/* Check quality byte, fetch time only */
-		rc_time	 = parse_time(&date, &tofs.tv_nsec, &rdata, 5);
+		rc_time	 = parse_time(&date, &tofs, &rdata, 5);
 		pp->leap = parse_qual(&rdata, 6, 'A', 0);
-		rc_date	 = unfold_day(&date, rd_timestamp.l_ui);
 		if (CLK_FLAG4 & pp->sloppyclockflag)
 			field_wipe(&rdata, 1, 3, -1);
 		break;
-	
+
 	case NMEA_GPZDA:
 		/* No quality.	Assume best, fetch time & full date */
-		pp->leap = LEAP_NOWARNING;
-		rc_time	 = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
-		rc_date	 = parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+		rc_time	= parse_time(&date, &tofs, &rdata, 1);
+		if (up->type_gpsdate <= DTYP_Y4D) {
+			rc_date	= parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+			rc_dtyp = DTYP_Y4D;
+		}
 		break;
 
 	case NMEA_GPZDG:
 		/* Check quality byte, fetch time & full date */
-		rc_time	 = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
-		rc_date	 = parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+		rc_time	 = parse_time(&date, &tofs, &rdata, 1);
 		pp->leap = parse_qual(&rdata, 4, '0', 1);
-		tofs.tv_sec = -1; /* GPZDG is following second */
+		--tofs.l_ui; /* GPZDG gives *following* second */
+		if (up->type_gpsdate <= DTYP_Y4D) {
+			rc_date	= parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+			rc_dtyp = DTYP_Y4D;
+		}
 		break;
 
 	case NMEA_PGRMF:
-		/* get date, time, qualifier and GPS weektime. We need
-		 * date and time-of-day for the century fix, so we read
-		 * them first.
-		 */
-		rc_date  = parse_weekdata(&gpsw, &rdata, 1, 2, 5)
-		        && parse_date(&date, &rdata, 3, DATE_1_DDMMYY);
-		rc_time  = parse_time(&date, &tofs.tv_nsec, &rdata, 4);
-		pp->leap = parse_qual(&rdata, 11, '0', 1);		
-		rc_date  = rc_date
-		        && gpsfix_century(&date, &gpsw, &up->century_cache);
+		/* get time, qualifier and GPS weektime. */
+		rc_time = parse_time(&date, &tofs, &rdata, 4);
+		if (up->type_gpsdate <= DTYP_W10B) {
+			rc_date = parse_gpsw(&wgps, &rdata, 1, 2, 5);
+			rc_dtyp = DTYP_W10B;
+		}
+		pp->leap = parse_qual(&rdata, 11, '0', 1);
 		if (CLK_FLAG4 & pp->sloppyclockflag)
 			field_wipe(&rdata, 6, 8, -1);
 		break;
-		
+
+	case NMEA_PUBX04:
+		/* PUBX,04 is peculiar. The UTC time-of-week is the *internal*
+		 * time base, which is not exactly on par with the fix time.
+		 */
+		rc_time = parse_time(&date, &tofs, &rdata, 2);
+		if (up->type_gpsdate <= DTYP_WEXT) {
+			rc_date = parse_gpsw(&wgps, &rdata, 5, 4, -1);
+			rc_dtyp = DTYP_WEXT;
+		}
+		break;
+
 	default:
 		INVARIANT(0);	/* Coverity 97123 */
 		return;
 	}
 
+	/* check clock sanity; [bug 2143] */
+	if (pp->leap == LEAP_NOTINSYNC) { /* no good status? */
+		checkres = CEVNT_PROP;
+		up->tally.rejected++;
+	}
 	/* Check sanity of time-of-day. */
-	if (rc_time == 0) {	/* no time or conversion error? */
+	else if (rc_time == 0) {	/* no time or conversion error? */
 		checkres = CEVNT_BADTIME;
 		up->tally.malformed++;
 	}
 	/* Check sanity of date. */
-	else if (rc_date == 0) {/* no date or conversion error? */
+	else if (rc_date == 0) {	/* no date or conversion error? */
 		checkres = CEVNT_BADDATE;
 		up->tally.malformed++;
 	}
-	/* check clock sanity; [bug 2143] */
-	else if (pp->leap == LEAP_NOTINSYNC) { /* no good status? */
-		checkres = CEVNT_BADREPLY;
-		up->tally.rejected++;
+	else {
+		checkres = -1;
 	}
-	else
-		checkres = -1;
 
 	if (checkres != -1) {
-		save_ltc(pp, rd_lastcode, rd_lencode);
+		refclock_save_lcode(pp, up->lb_buf, up->lb_len);
 		refclock_report(peer, checkres);
 		return;
 	}
 
-	DPRINTF(1, ("%s effective timecode: %04u-%02u-%02u %02d:%02d:%02d\n",
-		refnumtoa(&peer->srcadr),
-		date.year, date.month, date.monthday,
-		date.hour, date.minute, date.second));
+	/* See if we can augment the receive time stamp. If not, apply
+	 * fudge time 2 to the receive time stamp directly.
+	 */
+#   ifdef HAVE_PPSAPI
+	if (up->ppsapi_lit && pp->leap != LEAP_NOTINSYNC)
+		withpps = refclock_ppsaugment(
+			&up->atom, &rd_timestamp,
+			pp->fudgetime2, pp->fudgetime1);
+	else
+#   endif /* HAVE_PPSAPI */
+		rd_timestamp = ntpfp_with_fudge(
+			rd_timestamp, pp->fudgetime2);
 
-	/* Check if we must enter GPS time mode; log so if we do */
-	if (!up->gps_time && (sentence == NMEA_GPZDG)) {
-		msyslog(LOG_INFO, "%s using GPS time as if it were UTC",
-			refnumtoa(&peer->srcadr));
-		up->gps_time = 1;
+	/* set the GPS base date, if possible */
+	warp = !(peer->ttl & NMEA_DATETRUST_MASK);
+	if (rc_dtyp != DTYP_NONE) {
+		DPRINTF(1, ("%s saving date, type=%hu\n",
+			    refnumtoa(&peer->srcadr), rc_dtyp));
+		switch (rc_dtyp) {
+		case DTYP_W10B:
+			up->last_gpsdate = gpsntp_from_gpscal_ex(
+				&wgps, (warp = TRUE));
+			break;
+		case DTYP_WEXT:
+			up->last_gpsdate = gpsntp_from_gpscal_ex(
+				&wgps, warp);
+			break;
+		default:
+			up->last_gpsdate = gpsntp_from_calendar_ex(
+				&date, tofs, warp);
+			break;
+		}
+		up->type_gpsdate = rc_dtyp;
+		up->hold_gpsdate = DATE_HOLD;
 	}
-	
-	/*
-	 * Get the reference time stamp from the calendar buffer.
+	/* now convert and possibly extend/expand the time stamp. */
+	if (up->hold_gpsdate) {	/* time of day, based */
+		dntp = gpsntp_from_daytime2_ex(
+			&date, tofs, &up->last_gpsdate, warp);
+	} else {		/* time of day, floating */
+		dntp = gpsntp_from_daytime1_ex(
+			&date, tofs, rd_timestamp, warp);
+	}
+
+	if (debug) {
+		/* debug print time stamp */
+		gpsntp_to_calendar(&date, &dntp);
+#	    ifdef HAVE_PPSAPI
+		DPRINTF(1, ("%s effective timecode: %s (%s PPS)\n",
+			    refnumtoa(&peer->srcadr),
+			    ntpcal_iso8601std(NULL, 0, &date),
+			    (withpps ? "with" : "without")));
+#	    else /* ?HAVE_PPSAPI */
+		DPRINTF(1, ("%s effective timecode: %s\n",
+			    refnumtoa(&peer->srcadr),
+			    ntpcal_iso8601std(NULL, 0, &date)));
+#	    endif /* !HAVE_PPSAPI */
+	}
+
+	/* Get the reference time stamp from the calendar buffer.
 	 * Process the new sample in the median filter and determine the
 	 * timecode timestamp, but only if the PPS is not in control.
 	 * Discard sentence if reference time did not change.
 	 */
-	rd_reftime = eval_gps_time(peer, &date, &tofs, &rd_timestamp);
+	rd_reftime = ntpfp_from_ntpdatum(&dntp);
 	if (L_ISEQU(&up->last_reftime, &rd_reftime)) {
 		/* Do not touch pp->a_lastcode on purpose! */
 		up->tally.filtered++;
@@ -1037,59 +971,120 @@
 		return;
 	}
 	up->last_reftime = rd_reftime;
-	rd_fudge = pp->fudgetime2;
 
 	DPRINTF(1, ("%s using '%s'\n",
-		    refnumtoa(&peer->srcadr), rd_lastcode));
+		    refnumtoa(&peer->srcadr), up->lb_buf));
 
 	/* Data will be accepted. Update stats & log data. */
 	up->tally.accepted++;
-	save_ltc(pp, rd_lastcode, rd_lencode);
+	refclock_save_lcode(pp, up->lb_buf, up->lb_len);
 	pp->lastrec = rd_timestamp;
 
-#ifdef HAVE_PPSAPI
-	/*
-	 * If we have PPS running, we try to associate the sentence
-	 * with the last active edge of the PPS signal.
+	/* If we have PPS augmented receive time, we *must* have a
+	 * working PPS source and we must set the flags accordingly.
 	 */
-	if (up->ppsapi_lit)
-		switch (refclock_ppsrelate(
-				pp, &up->atom, &rd_reftime, &rd_timestamp,
-				pp->fudgetime1,	&rd_fudge))
-		{
-		case PPS_RELATE_PHASE:
-			up->ppsapi_gate = TRUE;
-			peer->precision = PPS_PRECISION;
-			peer->flags |= FLAG_PPS;
+#   ifdef HAVE_PPSAPI
+	if (withpps) {
+		up->ppsapi_gate = TRUE;
+		peer->precision = PPS_PRECISION;
+		if (tabsdiffd(rd_reftime, rd_timestamp) < 0.5) {
+			if ( ! (peer->ttl & NMEA_QUIETPPS_MASK))
+				peer->flags |= FLAG_PPS;
 			DPRINTF(2, ("%s PPS_RELATE_PHASE\n",
 				    refnumtoa(&peer->srcadr)));
 			up->tally.pps_used++;
-			break;
-			
-		case PPS_RELATE_EDGE:
-			up->ppsapi_gate = TRUE;
-			peer->precision = PPS_PRECISION;
+		} else {
 			DPRINTF(2, ("%s PPS_RELATE_EDGE\n",
 				    refnumtoa(&peer->srcadr)));
-			break;
-			
-		case PPS_RELATE_NONE:
-		default:
-			/*
-			 * Resetting precision and PPS flag is done in
-			 * 'nmea_poll', since it might be a glitch. But
-			 * at the end of the poll cycle we know...
-			 */
-			DPRINTF(2, ("%s PPS_RELATE_NONE\n",
-				    refnumtoa(&peer->srcadr)));
-			break;
 		}
-#endif /* HAVE_PPSAPI */
+		/* !Note! 'FLAG_PPS' is reset in 'nmea_poll()' */
+	}
+#   endif /* HAVE_PPSAPI */
+	/* Whether the receive time stamp is PPS-augmented or not,
+	 * the proper fudge offset is already applied. There's no
+	 * residual fudge to process.
+	 */
+	refclock_process_offset(pp, rd_reftime, rd_timestamp, 0.0);
+	up->rcvtout = 2;
+}
 
-	refclock_process_offset(pp, rd_reftime, rd_timestamp, rd_fudge);
+/*
+ * -------------------------------------------------------------------
+ * nmea_receive - receive data from the serial interface
+ *
+ * With serial IO only, a single call to 'refclock_gtlin()' to get the
+ * string would suffice to get the NMEA data. When using NMEAD, this
+ * does unfortunately no longer hold, since TCP is stream oriented and
+ * not line oriented, and there's no one to do the line-splitting work
+ * of the TTY driver in line/cooked mode.
+ *
+ * So we have to do this manually here, and we have to live with the
+ * fact that there could be more than one sentence in a receive buffer.
+ * Likewise, there can be partial messages on either end. (Strictly
+ * speaking, a receive buffer could also contain just a single fragment,
+ * though that's unlikely.)
+ *
+ * We deal with that by scanning the input buffer, copying bytes from
+ * the receive buffer to the assembly buffer as we go and calling the
+ * record processor every time we hit a CR/LF, provided the resulting
+ * line is not empty. Any leftovers are kept for the next round.
+ *
+ * Note: When used with a serial data stream, there's no change to the
+ * previous line-oriented input: One line is copied to the buffer and
+ * processed per call. Only with NMEAD the behavior changes, and the
+ * timing is badly affected unless a PPS channel is also associated with
+ * the clock instance. TCP leaves us nothing to improve on here.
+ * -------------------------------------------------------------------
+ */
+static void
+nmea_receive(
+	struct recvbuf * rbufp
+	)
+{
+	/* declare & init control structure pointers */
+	struct peer	    * const peer = rbufp->recv_peer;
+	struct refclockproc * const pp = peer->procptr;
+	nmea_unit	    * const up = (nmea_unit*)pp->unitptr;
+
+	const char *sp, *se;
+	char	   *dp, *de;
+
+	/* paranoia check: */
+	if (up->lb_len >= sizeof(up->lb_buf))
+		up->lb_len = 0;
+
+	/* pick up last assembly position; leave room for NUL */
+	dp = up->lb_buf + up->lb_len;
+	de = up->lb_buf + sizeof(up->lb_buf) - 1;
+	/* set up input range */
+	sp = (const char *)rbufp->recv_buffer;
+	se = sp + rbufp->recv_length;
+
+	/* walk over the input data, dropping parity bits and control
+	 * chars as we go, and calling the record processor for each
+	 * complete non-empty line.
+	 */
+	while (sp != se) {
+		char ch = (*sp++ & 0x7f);
+		if (dp == up->lb_buf) {
+			if (ch == '$')
+				*dp++ = ch;
+		} else if (dp > de) {
+			dp = up->lb_buf;
+		} else if (ch == '\n' || ch == '\r') {
+			*dp = '\0';
+			up->lb_len = (int)(dp - up->lb_buf);
+			dp = up->lb_buf;
+			nmea_procrec(peer, rbufp->recv_time);
+		} else if (ch >= 0x20 && ch < 0x7f) {
+			*dp++ = ch;
+		}
+	}
+	/* update state to keep for next round */
+	*dp = '\0';
+	up->lb_len = (int)(dp - up->lb_buf);
 }
 
-
 /*
  * -------------------------------------------------------------------
  * nmea_poll - called by the transmit procedure
@@ -1109,12 +1104,12 @@
 {
 	struct refclockproc * const pp = peer->procptr;
 	nmea_unit	    * const up = (nmea_unit *)pp->unitptr;
-	
+
 	/*
 	 * Process median filter samples. If none received, declare a
 	 * timeout and keep going.
 	 */
-#ifdef HAVE_PPSAPI
+#   ifdef HAVE_PPSAPI
 	/*
 	 * If we don't have PPS pulses and time stamps, turn PPS down
 	 * for now.
@@ -1125,7 +1120,7 @@
 	} else {
 		up->ppsapi_gate = FALSE;
 	}
-#endif /* HAVE_PPSAPI */
+#   endif /* HAVE_PPSAPI */
 
 	/*
 	 * If the median filter is empty, claim a timeout. Else process
@@ -1132,13 +1127,18 @@
 	 * the input data and keep the stats going.
 	 */
 	if (pp->coderecv == pp->codeproc) {
-		refclock_report(peer, CEVNT_TIMEOUT);
+		peer->flags &= ~FLAG_PPS;
+		if (pp->currentstatus < CEVNT_TIMEOUT)
+		    refclock_report(peer, CEVNT_TIMEOUT);
+		memset(&up->last_gpsdate, 0, sizeof(up->last_gpsdate));
 	} else {
 		pp->polls++;
 		pp->lastref = pp->lastrec;
 		refclock_receive(peer);
+		if (pp->currentstatus > CEVNT_NOMINAL)
+		    refclock_report(peer, CEVNT_NOMINAL);
 	}
-	
+
 	/*
 	 * If extended logging is required, write the tally stats to the
 	 * clockstats file; otherwise just do a normal clock stats
@@ -1160,26 +1160,6 @@
 	ZERO(up->tally);
 }
 
-/*
- * -------------------------------------------------------------------
- * Save the last timecode string, making sure it's properly truncated
- * if necessary and NUL terminated in any case.
- */
-static void
-save_ltc(
-	struct refclockproc * const pp,
-	const char * const          tc,
-	size_t                      len
-	)
-{
-	if (len >= sizeof(pp->a_lastcode))
-		len = sizeof(pp->a_lastcode) - 1;
-	pp->lencode = (u_short)len;
-	memcpy(pp->a_lastcode, tc, len);
-	pp->a_lastcode[len] = '\0';
-}
-
-
 #if NMEA_WRITE_SUPPORT
 /*
  * -------------------------------------------------------------------
@@ -1257,8 +1237,8 @@
  *   $GPVTG,089.0,T,,,15.2,N,,*7F
  *
  * Some other constraints:
- * + The field name must at least 5 upcase characters or digits and must
- *   start with a character.
+ * + The field name must be at least 5 upcase characters or digits and
+ *   must start with a character.
  * + The checksum (if present) must be uppercase hex digits.
  * + The length of a sentence is limited to 80 characters (not including
  *   the final CR/LF nor the checksum, but including the leading '$')
@@ -1284,7 +1264,7 @@
 	u_char cs_r;	/* checksum remote given	*/
 	char * eptr;	/* buffer end end pointer	*/
 	char   tmp;	/* char buffer 			*/
-	
+
 	cs_l = 0;
 	cs_r = 0;
 	/* some basic input constraints */
@@ -1292,8 +1272,8 @@
 		dlen = 0;
 	eptr = cptr + dlen;
 	*eptr = '\0';
-	
-	/* load data context */	
+
+	/* load data context */
 	data->base = cptr;
 	data->cptr = cptr;
 	data->cidx = 0;
@@ -1315,7 +1295,7 @@
 	data->base++;
 	data->cptr++;
 	data->blen--;
-	
+
 	/* -*- field name: '[A-Z][A-Z0-9]{4,},' */
 	if (*cptr < 'A' || *cptr > 'Z')
 		return CHECK_INVALID;
@@ -1330,7 +1310,7 @@
 	/* -*- data: '[^*]*' */
 	while (*cptr && *cptr != '*')
 		cs_l ^= *cptr++;
-	
+
 	/* -*- checksum field: (\*[0-9A-F]{2})?$ */
 	if (*cptr == '\0')
 		return CHECK_VALID;
@@ -1386,7 +1366,7 @@
  * -------------------------------------------------------------------
  * Wipe (that is, overwrite with '_') data fields and the checksum in
  * the last timecode.  The list of field indices is given as integers
- * in a varargs list, preferrably in ascending order, in any case
+ * in a varargs list, preferably in ascending order, in any case
  * terminated by a negative field index.
  *
  * A maximum number of 8 fields can be overwritten at once to guard
@@ -1412,7 +1392,7 @@
 	int	fcnt;		/* safeguard against runaway arglist */
 	int	fidx;		/* field to nuke, or -1 for checksum */
 	char  * cp;		/* overwrite destination */
-	
+
 	fcnt = 8;
 	cp = NULL;
 	va_start(va, data);
@@ -1429,7 +1409,7 @@
 			if ('.' != *cp)
 				*cp = '_';
 	} while (fcnt-- && fidx >= 0);
-	va_end(va);	
+	va_end(va);
 }
 
 /*
@@ -1436,7 +1416,198 @@
  * -------------------------------------------------------------------
  * PARSING HELPERS
  * -------------------------------------------------------------------
+ */
+typedef unsigned char const UCC;
+
+static char const * const s_eof_chars = ",*\r\n";
+
+static int field_length(UCC *cp, unsigned int nfields)
+{
+	char const * ep = (char const*)cp;
+	ep = strpbrk(ep, s_eof_chars);
+	if (ep && nfields)
+		while (--nfields && ep && *ep == ',')
+			ep = strpbrk(ep + 1, s_eof_chars);
+	return (ep)
+	    ? (int)((UCC*)ep - cp)
+	    : (int)strlen((char const*)cp);
+}
+
+/* /[,*\r\n]/ --> skip */
+static int _parse_eof(UCC *cp, UCC ** ep)
+{
+	int rc = (strchr(s_eof_chars, *(char const*)cp) != NULL);
+	*ep = cp + rc;
+	return rc;
+}
+
+/* /,/ --> skip */
+static int _parse_sep(UCC *cp, UCC ** ep)
+{
+	int rc = (*cp == ',');
+	*ep = cp + rc;
+	return rc;
+}
+
+/* /[[:digit:]]{2}/ --> uint16_t */
+static int _parse_num2d(UCC *cp, UCC ** ep, uint16_t *into)
+{
+	int	rc = FALSE;
+
+	if (isdigit(cp[0]) && isdigit(cp[1])) {
+		*into = (cp[0] - '0') * 10 + (cp[1] - '0');
+		cp += 2;
+		rc = TRUE;
+	}
+	*ep = cp;
+	return rc;
+}
+
+/* /[[:digit:]]+/ --> uint16_t */
+static int _parse_u16(UCC *cp, UCC **ep, uint16_t *into, unsigned int ndig)
+{
+	uint16_t	num = 0;
+	int		rc  = FALSE;
+	if (isdigit(*cp) && ndig) {
+		rc = TRUE;
+		do
+			num = (num * 10) + (*cp - '0');
+		while (isdigit(*++cp) && --ndig);
+		*into = num;
+	}
+	*ep = cp;
+	return rc;
+}
+
+/* /[[:digit:]]+/ --> uint32_t */
+static int _parse_u32(UCC *cp, UCC **ep, uint32_t *into, unsigned int ndig)
+{
+	uint32_t	num = 0;
+	int		rc  = FALSE;
+	if (isdigit(*cp) && ndig) {
+		rc = TRUE;
+		do
+			num = (num * 10) + (*cp - '0');
+		while (isdigit(*++cp) && --ndig);
+		*into = num;
+	}
+	*ep = cp;
+	return rc;
+}
+
+/* /(\.[[:digit:]]*)?/ --> l_fp{0, f}
+ * read fractional seconds, convert to l_fp
  *
+ * Only the first 9 decimal digits are evaluated; any excess is parsed
+ * away but silently ignored. (--> truncation to 1 nanosecond)
+ */
+static int _parse_frac(UCC *cp, UCC **ep, l_fp *into)
+{
+	static const uint32_t powtab[10] = {
+		        0,
+		100000000, 10000000, 1000000,
+		   100000,    10000,    1000,
+		      100,       10,       1
+	};
+
+	struct timespec	ts;
+	ZERO(ts);
+	if (*cp == '.') {
+		uint32_t fval = 0;
+		UCC *    sp   = cp + 1;
+		if (_parse_u32(sp, &cp, &fval, 9))
+			ts.tv_nsec = fval * powtab[(size_t)(cp - sp)];
+		while (isdigit(*cp))
+			++cp;
+	}
+
+	*ep   = cp;
+	*into = tspec_intv_to_lfp(ts);
+	return TRUE;
+}
+
+/* /[[:digit:]]{6}/ --> time-of-day
+ * parses a number string representing 'HHMMSS'
+ */
+static int _parse_time(UCC *cp, UCC ** ep, TCivilDate *into)
+{
+	uint16_t	s, m, h;
+	int		rc;
+	UCC *		xp = cp;
+
+	rc =   _parse_num2d(cp, &cp, &h) && (h < 24)
+	    && _parse_num2d(cp, &cp, &m) && (m < 60)
+	    && _parse_num2d(cp, &cp, &s) && (s < 61); /* leap seconds! */
+
+	if (rc) {
+		into->hour   = (uint8_t)h;
+		into->minute = (uint8_t)m;
+		into->second = (uint8_t)s;
+		*ep = cp;
+	} else {
+		*ep = xp;
+		DPRINTF(1, ("nmea: invalid time code: '%.*s'\n",
+			    field_length(xp, 1), xp));
+	}
+	return rc;
+}
+
+/* /[[:digit:]]{6}/ --> civil date
+ * parses a number string representing 'ddmmyy'
+ */
+static int _parse_date1(UCC *cp, UCC **ep, TCivilDate *into)
+{
+	unsigned short	d, m, y;
+	int		rc;
+	UCC *		xp = cp;
+
+	rc =   _parse_num2d(cp, &cp, &d) && (d - 1 < 31)
+	    && _parse_num2d(cp, &cp, &m) && (m - 1 < 12)
+	    && _parse_num2d(cp, &cp, &y)
+	    && _parse_eof(cp, ep);
+	if (rc) {
+		into->monthday = (uint8_t )d;
+		into->month    = (uint8_t )m;
+		into->year     = (uint16_t)y;
+		*ep = cp;
+	} else {
+		*ep = xp;
+		DPRINTF(1, ("nmea: invalid date code: '%.*s'\n",
+			    field_length(xp, 1), xp));
+	}
+	return rc;
+}
+
+/* /[[:digit:]]+,[[:digit:]]+,[[:digit:]]+/ --> civil date
+ * parses three successive numeric fields as date: day,month,year
+ */
+static int _parse_date3(UCC *cp, UCC **ep, TCivilDate *into)
+{
+	uint16_t	d, m, y;
+	int		rc;
+	UCC *		xp = cp;
+
+	rc =   _parse_u16(cp, &cp, &d, 2) && (d - 1 < 31)
+	    && _parse_sep(cp, &cp)
+	    && _parse_u16(cp, &cp, &m, 2) && (m - 1 < 12)
+	    && _parse_sep(cp, &cp)
+	    && _parse_u16(cp, &cp, &y, 4) && (y > 1980)
+	    && _parse_eof(cp, ep);
+	if (rc) {
+		into->monthday = (uint8_t )d;
+		into->month    = (uint8_t )m;
+		into->year     = (uint16_t)y;
+		*ep = cp;
+	} else {
+		*ep = xp;
+		DPRINTF(1, ("nmea: invalid date code: '%.*s'\n",
+			    field_length(xp, 3), xp));
+	}
+	return rc;
+}
+
+/*
+ * -------------------------------------------------------------------
  * Check sync status
  *
  * If the character at the data field start matches the tag value,
@@ -1453,12 +1624,11 @@
 	int         inv
 	)
 {
-	static const u_char table[2] =
-				{ LEAP_NOTINSYNC, LEAP_NOWARNING };
-	char * dp;
+	static const u_char table[2] = {
+		LEAP_NOTINSYNC, LEAP_NOWARNING };
 
-	dp = field_parse(rd, idx);
-	
+	char * dp = field_parse(rd, idx);
+
 	return table[ *dp && ((*dp == tag) == !inv) ];
 }
 
@@ -1472,48 +1642,16 @@
 static int
 parse_time(
 	struct calendar * jd,	/* result calendar pointer */
-	long		* ns,	/* storage for nsec fraction */
+	l_fp		* fofs,	/* storage for nsec fraction */
 	nmea_data       * rd,
 	int		  idx
 	)
 {
-	static const unsigned long weight[4] = {
-		0, 100000000, 10000000, 1000000
-	};
+	UCC * 	dp = (UCC*)field_parse(rd, idx);
 
-	int	rc;
-	u_int	h;
-	u_int	m;
-	u_int	s;
-	int	p1;
-	int	p2;
-	u_long	f;
-	char  * dp;
-
-	dp = field_parse(rd, idx);
-	rc = sscanf(dp, "%2u%2u%2u%n.%3lu%n", &h, &m, &s, &p1, &f, &p2);
-	if (rc < 3 || p1 != 6) {
-		DPRINTF(1, ("nmea: invalid time code: '%.6s'\n", dp));
-		return FALSE;
-	}
-	
-	/* value sanity check */
-	if (h > 23 || m > 59 || s > 60) {
-		DPRINTF(1, ("nmea: invalid time spec %02u:%02u:%02u\n",
-			    h, m, s));
-		return FALSE;
-	}
-
-	jd->hour   = (u_char)h;
-	jd->minute = (u_char)m;
-	jd->second = (u_char)s;
-	/* if we have a fraction, scale it up to nanoseconds. */
-	if (rc == 4)
-		*ns = f * weight[p2 - p1 - 1];
-	else
-		*ns = 0;
-
-	return TRUE;
+	return _parse_time(dp, &dp, jd)
+	    && _parse_frac(dp, &dp, fofs)
+	    && _parse_eof (dp, &dp);
 }
 
 /*
@@ -1534,52 +1672,18 @@
 	enum date_fmt	  fmt
 	)
 {
-	int	rc;
-	u_int	y;
-	u_int	m;
-	u_int	d;
-	int	p;
-	char  * dp;
-	
-	dp = field_parse(rd, idx);
+	UCC  * dp = (UCC*)field_parse(rd, idx);
+
 	switch (fmt) {
-
 	case DATE_1_DDMMYY:
-		rc = sscanf(dp, "%2u%2u%2u%n", &d, &m, &y, &p);
-		if (rc != 3 || p != 6) {
-			DPRINTF(1, ("nmea: invalid date code: '%.6s'\n",
-				    dp));
-			return FALSE;
-		}
-		break;
-
+		return _parse_date1(dp, &dp, jd);
 	case DATE_3_DDMMYYYY:
-		rc = sscanf(dp, "%2u,%2u,%4u%n", &d, &m, &y, &p);
-		if (rc != 3 || p != 10) {
-			DPRINTF(1, ("nmea: invalid date code: '%.10s'\n",
-				    dp));
-			return FALSE;
-		}
-		break;
-
+		return _parse_date3(dp, &dp, jd);
 	default:
 		DPRINTF(1, ("nmea: invalid parse format: %d\n", fmt));
-		return FALSE;
+		break;
 	}
-
-	/* value sanity check */
-	if (d < 1 || d > 31 || m < 1 || m > 12) {
-		DPRINTF(1, ("nmea: invalid date spec (YMD) %04u:%02u:%02u\n",
-			    y, m, d));
-		return FALSE;
-	}
-	
-	/* store results */
-	jd->monthday = (u_char)d;
-	jd->month    = (u_char)m;
-	jd->year     = (u_short)y;
-
-	return TRUE;
+	return FALSE;
 }
 
 /*
@@ -1592,285 +1696,58 @@
  * -------------------------------------------------------------------
  */
 static int
-parse_weekdata(
-	gps_weektm * wd,
-	nmea_data  * rd,
+parse_gpsw(
+	TGpsDatum *  wd,
+	nmea_data *  rd,
 	int          weekidx,
 	int          timeidx,
 	int          leapidx
 	)
 {
-	u_long secs;
-	int    fcnt;
+	uint32_t	secs;
+	uint16_t	week, leap = 0;
+	l_fp		fofs;
+	int		rc;
 
-	/* parse fields and count success */
-	fcnt  = sscanf(field_parse(rd, weekidx), "%hu", &wd->wt_week);
-	fcnt += sscanf(field_parse(rd, timeidx), "%lu", &secs);
-	fcnt += sscanf(field_parse(rd, leapidx), "%hd", &wd->wt_leap);
-	if (fcnt != 3 || wd->wt_week >= 1024 || secs >= 7*SECSPERDAY) {
-		DPRINTF(1, ("nmea: parse_weekdata: invalid weektime spec\n"));
-		return FALSE;
+	UCC *	dpw = (UCC*)field_parse(rd, weekidx);
+	UCC *	dps = (UCC*)field_parse(rd, timeidx);
+
+	rc =   _parse_u16 (dpw, &dpw, &week, 5)
+	    && _parse_eof (dpw, &dpw)
+	    && _parse_u32 (dps, &dps, &secs, 9)
+	    && _parse_frac(dps, &dps, &fofs)
+	    && _parse_eof (dps, &dps)
+	    && (secs < 7*SECSPERDAY);
+	if (rc && leapidx > 0) {
+		UCC *	dpl = (UCC*)field_parse(rd, leapidx);
+		rc =   _parse_u16 (dpl, &dpl, &leap, 5)
+		    && _parse_eof (dpl, &dpl);
 	}
-	wd->wt_time = (u_int32)secs;
-
-	return TRUE;
+	if (rc) {
+		fofs.l_ui -= leap;
+		*wd = gpscal_from_gpsweek(week, secs, fofs);
+	} else {
+		DPRINTF(1, ("nmea: parse_gpsw: invalid weektime spec\n"));
+	}
+	return rc;
 }
 
-/*
- * -------------------------------------------------------------------
- * funny calendar-oriented stuff -- perhaps a bit hard to grok.
- * -------------------------------------------------------------------
- *
- * Unfold a time-of-day (seconds since midnight) around the current
- * system time in a manner that guarantees an absolute difference of
- * less than 12hrs.
- *
- * This function is used for NMEA sentences that contain no date
- * information. This requires the system clock to be in +/-12hrs
- * around the true time, or the clock will synchronize the system 1day
- * off if not augmented with a time sources that also provide the
- * necessary date information.
- *
- * The function updates the calendar structure it also uses as
- * input to fetch the time from.
- *
- * returns 1 on success, 0 on failure
- * -------------------------------------------------------------------
- */
-static int
-unfold_day(
-	struct calendar * jd,
-	u_int32		  rec_ui
-	)
-{
-	vint64	     rec_qw;
-	ntpcal_split rec_ds;
 
-	/*
-	 * basically this is the peridiodic extension of the receive
-	 * time - 12hrs to the time-of-day with a period of 1 day.
-	 * But we would have to execute this in 64bit arithmetic, and we
-	 * cannot assume we can do this; therefore this is done
-	 * in split representation.
-	 */
-	rec_qw = ntpcal_ntp_to_ntp(rec_ui - SECSPERDAY/2, NULL);
-	rec_ds = ntpcal_daysplit(&rec_qw);
-	rec_ds.lo = ntpcal_periodic_extend(rec_ds.lo,
-					   ntpcal_date_to_daysec(jd),
-					   SECSPERDAY);
-	rec_ds.hi += ntpcal_daysec_to_date(jd, rec_ds.lo);
-	return (ntpcal_rd_to_date(jd, rec_ds.hi + DAY_NTP_STARTS) >= 0);
-}
-
-/*
- * -------------------------------------------------------------------
- * A 2-digit year is expanded into full year spec around the year found
- * in 'jd->year'. This should be in +79/-19 years around the system time,
- * or the result will be off by 100 years.  The assymetric behaviour was
- * chosen to enable inital sync for systems that do not have a
- * battery-backup clock and start with a date that is typically years in
- * the past.
- *
- * Since the GPS epoch starts at 1980-01-06, the resulting year will be
- * not be before 1980 in any case.
- *
- * returns 1 on success, 0 on failure
- * -------------------------------------------------------------------
- */
-static int
-unfold_century(
-	struct calendar * jd,
-	u_int32		  rec_ui
+#ifdef HAVE_PPSAPI
+static double
+tabsdiffd(
+	l_fp	t1,
+	l_fp	t2
 	)
 {
-	struct calendar rec;
-	int32		baseyear;
-
-	ntpcal_ntp_to_date(&rec, rec_ui, NULL);
-	baseyear = rec.year - 20;
-	if (baseyear < g_gpsMinYear)
-		baseyear = g_gpsMinYear;
-	jd->year = (u_short)ntpcal_periodic_extend(baseyear, jd->year,
-						   100);
-
-	return ((baseyear <= jd->year) && (baseyear + 100 > jd->year));
+	double	dd;
+	L_SUB(&t1, &t2);
+	LFPTOD(&t1, dd);
+	return fabs(dd);
 }
+#endif /* HAVE_PPSAPI */
 
 /*
- * -------------------------------------------------------------------
- * A 2-digit year is expanded into a full year spec by correlation with
- * a GPS week number and the current leap second count.
- *
- * The GPS week time scale counts weeks since Sunday, 1980-01-06, modulo
- * 1024 and seconds since start of the week. The GPS time scale is based
- * on international atomic time (TAI), so the leap second difference to
- * UTC is also needed for a proper conversion.
- *
- * A brute-force analysis (that is, test for every date) shows that a
- * wrong assignment of the century can not happen between the years 1900
- * to 2399 when comparing the week signatures for different
- * centuries. (I *think* that will not happen for 400*1024 years, but I
- * have no valid proof. -*-perlinger@ntp.org-*-)
- *
- * This function is bound to to work between years 1980 and 2399
- * (inclusive), which should suffice for now ;-)
- *
- * Note: This function needs a full date&time spec on input due to the
- * necessary leap second corrections!
- *
- * returns 1 on success, 0 on failure
- * -------------------------------------------------------------------
- */
-static int
-gpsfix_century(
-	struct calendar  * jd,
-	const gps_weektm * wd,
-	u_short          * century
-	) 
-{
-	int32	days;
-	int32	doff;
-	u_short week;
-	u_short year;
-	int     loop;
-
-	/* Get day offset. Assumes that the input time is in range and
-	 * that the leap seconds do not shift more than +/-1 day.
-	 */
-	doff = ntpcal_date_to_daysec(jd) + wd->wt_leap;
-	doff = (doff >= SECSPERDAY) - (doff < 0);
-
-	/*
-	 * Loop over centuries to get a match, starting with the last
-	 * successful one. (Or with the 19th century if the cached value
-	 * is out of range...)
-	 */
-	year = jd->year % 100;
-	for (loop = 5; loop > 0; loop--,(*century)++) {
-		if (*century < 19 || *century >= 24)
-			*century = 19;
-		/* Get days and week in GPS epoch */
-		jd->year = year + *century * 100;
-		days = ntpcal_date_to_rd(jd) - DAY_GPS_STARTS + doff;
-		week = (days / 7) % 1024;
-		if (days >= 0 && wd->wt_week == week)
-			return TRUE; /* matched... */
-	}
-
-	jd->year = year;
-	return FALSE; /* match failed... */
-}
-
-/*
- * -------------------------------------------------------------------
- * And now the final execise: Considering the fact that many (most?)
- * GPS receivers cannot handle a GPS epoch wrap well, we try to
- * compensate for that problem by unwrapping a GPS epoch around the
- * receive stamp. Another execise in periodic unfolding, of course,
- * but with enough points to take care of.
- *
- * Note: The integral part of 'tofs' is intended to handle small(!)
- * systematic offsets, as -1 for handling $GPZDG, which gives the
- * following second. (sigh...) The absolute value shall be less than a
- * day (86400 seconds).
- * -------------------------------------------------------------------
- */
-static l_fp
-eval_gps_time(
-	struct peer           * peer, /* for logging etc */
-	const struct calendar * gpst, /* GPS time stamp  */
-	const struct timespec * tofs, /* GPS frac second & offset */
-	const l_fp            * xrecv /* receive time stamp */
-	)
-{
-	struct refclockproc * const pp = peer->procptr;
-	nmea_unit	    * const up = (nmea_unit *)pp->unitptr;
-
-	l_fp    retv;
-
-	/* components of calculation */
-	int32_t rcv_sec, rcv_day; /* receive ToD and day */
-	int32_t gps_sec, gps_day; /* GPS ToD and day in NTP epoch */
-	int32_t adj_day, weeks;   /* adjusted GPS day and week shift */
-
-	/* some temporaries to shuffle data */
-	vint64       vi64;
-	ntpcal_split rs64;
-
-	/* evaluate time stamp from receiver. */
-	gps_sec = ntpcal_date_to_daysec(gpst);
-	gps_day = ntpcal_date_to_rd(gpst) - DAY_NTP_STARTS;
-
-	/* merge in fractional offset */
-	retv = tspec_intv_to_lfp(*tofs);
-	gps_sec += retv.l_i;
-
-	/* If we fully trust the GPS receiver, just combine days and
-	 * seconds and be done. */
-	if (peer->ttl & NMEA_DATETRUST_MASK) {
-		retv.l_ui = ntpcal_dayjoin(gps_day, gps_sec).D_s.lo;
-		return retv;
-	}
-
-	/* So we do not trust the GPS receiver to deliver a correct date
-	 * due to the GPS epoch changes. We map the date from the
-	 * receiver into the +/-512 week interval around the receive
-	 * time in that case. This would be a tad easier with 64bit
-	 * calculations, but again, we restrict the code to 32bit ops
-	 * when possible. */
-
-	/* - make sure the GPS fractional day is normalised
-	 * Applying the offset value might have put us slightly over the
-	 * edge of the allowed range for seconds-of-day. Doing a full
-	 * division with floor correction is overkill here; a simple
-	 * addition or subtraction step is sufficient. Using WHILE loops
-	 * gives the right result even if the offset exceeds one day,
-	 * which is NOT what it's intented for! */
-	while (gps_sec >= SECSPERDAY) {
-		gps_sec -= SECSPERDAY;
-		gps_day += 1;
-	}
-	while (gps_sec < 0) {
-		gps_sec += SECSPERDAY;
-		gps_day -= 1;
-	}
-
-	/* - get unfold base: day of full recv time - 512 weeks */
-	vi64 = ntpcal_ntp_to_ntp(xrecv->l_ui, NULL);
-	rs64 = ntpcal_daysplit(&vi64);
-	rcv_sec = rs64.lo;
-	rcv_day = rs64.hi - 512 * 7;
-
-	/* - take the fractional days into account
-	 * If the fractional day of the GPS time is smaller than the
-	 * fractional day of the receive time, we shift the base day for
-	 * the unfold by 1. */
-	if (   gps_sec  < rcv_sec
-	   || (gps_sec == rcv_sec && retv.l_uf < xrecv->l_uf))
-		rcv_day += 1;
-
-	/* - don't warp ahead of GPS invention! */
-	if (rcv_day < g_gpsMinBase)
-		rcv_day = g_gpsMinBase;
-
-	/* - let the magic happen: */
-	adj_day = ntpcal_periodic_extend(rcv_day, gps_day, 1024*7);
-
-	/* - check if we should log a GPS epoch warp */
-	weeks = (adj_day - gps_day) / 7;
-	if (weeks != up->epoch_warp) {
-		up->epoch_warp = weeks;
-		LOGIF(CLOCKINFO, (LOG_INFO,
-				  "%s Changed GPS epoch warp to %d weeks",
-				  refnumtoa(&peer->srcadr), weeks));
-	}
-
-	/* - build result and be done */
-	retv.l_ui = ntpcal_dayjoin(adj_day, gps_sec).D_s.lo;
-	return retv;
-}
-
-/*
  * ===================================================================
  *
  * NMEAD support
@@ -1896,8 +1773,8 @@
 	)
 {
 	int	fd = -1;		/* result file descriptor */
-	
-#ifdef HAVE_READLINK
+
+#   ifdef HAVE_READLINK
 	char	host[80];		/* link target buffer	*/
 	char  * port;			/* port name or number	*/
 	int	rc;			/* result code (several)*/
@@ -1907,7 +1784,7 @@
 	struct addrinfo *ai;		/* result scan ptr	*/
 
 	fd = -1;
-	
+
 	/* try to read as link, make sure no overflow occurs */
 	rc = readlink(device, host, sizeof(host));
 	if ((size_t)rc >= sizeof(host))
@@ -1919,7 +1796,7 @@
 	if (!port)
 		return fd; /* not 'host:port' syntax ? */
 	*port++ = '\0';	/* put in separator */
-	
+
 	/* get address infos and try to open socket
 	 *
 	 * This getaddrinfo() is naughty in ntpd's nonblocking main
@@ -1933,7 +1810,7 @@
 	ai_hint.ai_socktype = SOCK_STREAM;
 	if (getaddrinfo(host, port, &ai_hint, &ai_list))
 		return fd;
-	
+
 	for (ai = ai_list; ai && (fd == -1); ai = ai->ai_next) {
 		sh = socket(ai->ai_family, ai->ai_socktype,
 			    ai->ai_protocol);
@@ -1946,9 +1823,11 @@
 			close(sh);
 	}
 	freeaddrinfo(ai_list);
-#else
+	if (fd != -1)
+		make_socket_nonblocking(fd);
+#   else
 	fd = -1;
-#endif
+#   endif
 
 	return fd;
 }
--- contrib/ntp/ntpd/refclock_oncore.c.orig
+++ contrib/ntp/ntpd/refclock_oncore.c
@@ -162,6 +162,7 @@
 #include "ntp_unixtime.h"
 #include "ntp_refclock.h"
 #include "ntp_calendar.h"
+#include "ntp_calgps.h"
 #include "ntp_stdlib.h"
 
 #include <stdio.h>
@@ -388,6 +389,7 @@
 static	void	oncore_shmem_get_3D   (struct instance *);
 static	void	oncore_ss	      (struct instance *);
 static	int	oncore_wait_almanac   (struct instance *);
+static	void	oncore_feed_clockproc (struct instance *);
 
 static	void	oncore_msg_any	   (struct instance *, u_char *, size_t, int);
 static	void	oncore_msg_Adef    (struct instance *, u_char *, size_t);
@@ -1872,12 +1874,16 @@
 
 	/* and some things I dont understand (magic ntp things) */
 
+#if 1
+	oncore_feed_clockproc(instance);
+#else
 	if (!refclock_process(instance->pp)) {
-		refclock_report(instance->peer, CEVNT_BADTIME);
+		refclock_report(peer, CEVNT_BADTIME);
 		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
 		return;
 	}
-
+#endif
+	
 	oncore_log(instance, LOG_INFO, Msg);	 /* this is long message above */
 	instance->pollcnt = 2;
 
@@ -4036,7 +4042,53 @@
 }
 
 
+static	void
+oncore_feed_clockproc(
+	struct instance * instance
+	)
+{
+	struct peer         * const peer = instance->peer;
+	struct refclockproc * const pp   = instance->pp;
+	
+	TCivilDate cd;	/* calendar date + time */
+	TGpsDatum  gd;	/* GPS datum, remapped into NTP epoch */
+	l_fp       fp;	/* the reference time in NTP format */
 
+	if (pp->year >= 1980) {
+		/* There are oncore receivers that run in a fixed
+		 * (possibly shifted) GPS era and fold back into that
+		 * era on every GPS week rollover.
+		 *
+		 * We do not trust the date we get and remap to a GPS
+		 * era defined by the GPS base date (derived from the
+		 * build time stamp or a 'tos basedate' config option.
+		 */
+		ZERO(fp);	/* has a zero to begin with */
+		ZERO(cd);	/* month == monthday == 0 -> use year+yearday */
+		cd.year    = pp->year;
+		cd.yearday = pp->day;
+		cd.hour    = pp->hour;
+		cd.minute  = pp->minute;
+		cd.second  = pp->second;
+		
+		/* the magic happens in the next line: */
+		gd = gpscal_from_calendar(&cd, fp); /* fp should be zero here */
+		
+		/* To avoid the trouble the day-of-year calculations in
+		 * 'refclock_process()' can cause we feed the time
+		 * stamps we have now directly. This also saves us two
+		 * full calendar calendar conversion cycles.
+		 */
+		fp = ntpfp_from_gpsdatum(&gd);
+		refclock_process_offset(pp, fp, pp->lastrec, pp->fudgetime1);
+	} else {
+		/* This is obviously a bad date/time... */
+		refclock_report(peer, CEVNT_BADDATE);
+		peer->flags &= ~FLAG_PPS;	/* problem - clear PPS FLAG */
+		return;
+	}
+}
+
 static void
 oncore_log (
 	struct instance *instance,
--- contrib/ntp/ntpd/refclock_palisade.c.orig
+++ contrib/ntp/ntpd/refclock_palisade.c
@@ -65,6 +65,10 @@
  *
  * 30/08/09: Added support for Trimble Acutime Gold Receiver.
  *	     Fernando P. Hauscarriaga (fernandoph@iar.unlp.edu.ar)
+ *
+ * 21/04/18: Added support for Resolution devices.
+ *
+ * 03/09/19: Added support for ACE III & Copernicus II.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -114,6 +118,9 @@
 #define CLK_THUNDERBOLT	2	/* Trimble Thunderbolt GPS Receiver */
 #define CLK_ACUTIME     3	/* Trimble Acutime Gold */
 #define CLK_ACUTIMEB    4	/* Trimble Actutime Gold Port B */
+#define CLK_RESOLUTION  5	/* Trimble Resolution Receivers */
+#define CLK_ACE		6	/* Trimble ACE III */
+#define CLK_COPERNICUS	7	/* Trimble Copernicus II */
 
 int praecis_msg;
 static void praecis_parse(struct recvbuf *rbufp, struct peer *peer);
@@ -122,7 +129,6 @@
  * They are taken from Markus Prosch
  */
 
-#ifdef PALISADE_SENDCMD_RESURRECTED
 /*
  * sendcmd - Build data packet for sending
  */
@@ -136,7 +142,6 @@
 	*(buffer->data + 1) = (unsigned char)c;
 	buffer->size = 2;
 }
-#endif	/* PALISADE_SENDCMD_RESURRECTED */
 
 /*
  * sendsupercmd - Build super data packet for sending
@@ -255,6 +260,37 @@
 }
 
 /*
+ * init_resolution - Prepares Resolution receiver to be used with NTP
+ */
+static void
+init_resolution (
+	int fd
+	)
+{
+	struct packettx tx;
+	
+	tx.size = 0;
+	tx.data = (u_char *) emalloc(100);
+
+	/* set UTC time */
+	sendsupercmd (&tx, 0x8E, 0xA2);
+	sendbyte     (&tx, 0x3);
+	sendetx      (&tx, fd);
+
+	/* squelch PPS output unless locked to at least one satellite */
+	sendsupercmd (&tx, 0x8E, 0x4E);
+	sendbyte     (&tx, 0x3);
+	sendetx      (&tx, fd);
+	
+	/* activate packets 0x8F-AB and 0x8F-AC */
+	sendsupercmd (&tx, 0x8E, 0xA5);
+	sendint      (&tx, 0x5);
+	sendetx      (&tx, fd);
+
+	free(tx.data);
+}
+
+/*
  * palisade_start - open the devices and initialize data for processing
  */
 static int
@@ -274,7 +310,9 @@
 	/*
 	 * Open serial port. 
 	 */
-	fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
+	u_int speed;
+	speed = (CLK_TYPE(peer) == CLK_COPERNICUS) ? SPEED232COP : SPEED232;
+	fd = refclock_open(gpsdev, speed, LDISC_RAW);
 	if (fd <= 0) {
 #ifdef DEBUG
 		printf("Palisade(%d) start: open %s failed\n", unit, gpsdev);
@@ -321,6 +359,25 @@
 		msyslog(LOG_NOTICE, "Palisade(%d) Acutime Gold mode enabled"
 			,unit);
 		break;
+	    case CLK_RESOLUTION:
+		msyslog(LOG_NOTICE, "Palisade(%d) Resolution mode enabled"
+			,unit);
+		tio.c_cflag = (CS8|CLOCAL|CREAD|PARENB|PARODD);
+		break;
+	    case CLK_ACE:
+		msyslog(LOG_NOTICE, "Palisade(%d) ACE III mode enabled"
+			,unit);
+		tio.c_cflag = (CS8|CLOCAL|CREAD|PARENB|PARODD);
+		break;
+	    case CLK_COPERNICUS:
+		msyslog(LOG_NOTICE, "Palisade(%d) Copernicus II mode enabled"
+			,unit);
+		/* Must use ORing/ANDing to set/clear c_cflag bits otherwise
+		   CBAUD gets set back to 0. This ought to be an issue for
+		   the other modes above but it seems that the baud rate
+		   defaults to 9600 if CBAUD gets set to 0.                 */
+		tio.c_cflag &= ~(PARENB|PARODD);
+		break;
 	    default:
 		msyslog(LOG_NOTICE, "Palisade(%d) mode unknown",unit);
 		break;
@@ -371,6 +428,8 @@
 		init_thunderbolt(fd);
 	if (up->type == CLK_ACUTIME)
 		init_acutime(fd);
+	if (up->type == CLK_RESOLUTION)
+		init_resolution(fd);
 
 	return 1;
 }
@@ -483,6 +542,9 @@
 	double secfrac;
 	unsigned short event = 0;
 	int mmday;
+	long tow;
+	uint16_t wn;
+	int GPS_UTC_Offset;
 	
 	struct palisade_unit *up;
 	struct refclockproc *pp;
@@ -496,7 +558,12 @@
 	 * proper format, declare bad format and exit.
 	 */
 
-	if ((up->type != CLK_THUNDERBOLT) & (up->type != CLK_ACUTIME)){
+	if ((up->type != CLK_THUNDERBOLT) &&
+	    (up->type != CLK_ACUTIME    ) &&
+	    (up->type != CLK_RESOLUTION ) &&
+	    (up->type != CLK_ACE        ) &&
+	    (up->type != CLK_COPERNICUS )   )
+	{
 		if ((up->rpt_buf[0] == (char) 0x41) ||
 		    (up->rpt_buf[0] == (char) 0x46) ||
 		    (up->rpt_buf[0] == (char) 0x54) ||
@@ -513,7 +580,7 @@
 	}
 
 	/*
-	 * We cast both to u_char to as 0x8f uses the sign bit on a char
+	 * We cast both to u_char as 0x8f uses the sign bit on a char
 	 */
 	if ((u_char) up->rpt_buf[0] == (u_char) 0x8f) {
 		/* 
@@ -525,8 +592,6 @@
 			return 0;	   
 	
 		switch (mb(0) & 0xff) {
-			int GPS_UTC_Offset;
-			long tow;
 
 		    case PACKET_8F0B: 
 
@@ -839,11 +904,70 @@
 #ifdef DEBUG
 		printf("GPS TOW: %ld\n", (long)getlong((u_char *) &mb(0)));
 		printf("GPS WN: %d\n", getint((u_char *) &mb(4)));
-		printf("GPS UTC-GPS Offser: %ld\n", (long)getlong((u_char *) &mb(6)));
+		printf("GPS UTC-GPS Offset: %ld\n", (long)getlong((u_char *) &mb(6)));
 #endif
 		return 0;
 	}
 
+	/* GPS time packet for ACE III or Copernicus II receiver */
+	else if ((up->rpt_buf[0] == PACKET_41) &&
+	         ((up->type == CLK_ACE) || (up->type == CLK_COPERNICUS))) {
+#ifdef DEBUG
+		if ((debug > 1) && (up->type == CLK_ACE))
+			printf("TSIP_decode: Packet 0x41 seen in ACE III mode\n");
+		if ((debug > 1) && (up->type == CLK_COPERNICUS))
+			printf("TSIP_decode: Packet 0x41 seen in Copernicus II mode\n");
+#endif
+		if (up->rpt_cnt != LENCODE_41) { /* check length */
+			refclock_report(peer, CEVNT_BADREPLY);
+			up->polled = -1;
+#ifdef DEBUG
+			printf("TSIP_decode: unit %d: bad packet %02x len %d\n", 
+				up->unit, up->rpt_buf[0] & 0xff, up->rpt_cnt);
+#endif
+			return 0;
+		}
+		if (up->polled  <= 0)
+			return 0;
+		tow = (long)getsingle((u_char *) &mb(0));
+		wn = (uint16_t)getint((u_char *) &mb(4));
+		GPS_UTC_Offset = (int)getsingle((u_char *) &mb(6));
+		if (GPS_UTC_Offset == 0){ /* Check UTC Offset */
+#ifdef DEBUG
+			printf("TSIP_decode: UTC Offset Unknown\n");
+#endif
+			refclock_report(peer, CEVNT_BADREPLY);
+			up->polled = -1;
+			return 0;
+		}
+		/* Get date & time from WN & ToW minus offset */
+		TCivilDate cd;
+		TGpsDatum wd;
+		l_fp ugo; /* UTC-GPS offset, negative number */
+		ugo.Ul_i.Xl_i = (int32_t)-GPS_UTC_Offset;
+		ugo.l_uf = 0;
+		wd = gpscal_from_gpsweek((wn % 1024), (int32_t)tow, ugo);
+		gpscal_to_calendar(&cd, &wd);
+		pp->year = cd.year;
+		pp->day = cd.yearday;
+		pp->hour = cd.hour;
+		pp->minute = cd.minute;
+		pp->second = cd.second;
+		pp->nsec = 0;
+		pp->leap = LEAP_NOWARNING;
+#ifdef DEBUG
+		if (debug > 1)	{
+			printf("GPS TOW: %ld\n", tow);
+			printf("GPS WN: %d\n", wn);
+			printf("GPS UTC-GPS Offset: %d\n", GPS_UTC_Offset);
+			printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d ",
+			       up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second,
+			       pp->nsec, cd.month, cd.monthday, pp->year);
+		}
+#endif
+		return 1;
+	}
+
 	/* Health Status for Acutime Receiver */
 	else if ((up->rpt_buf[0] == PACKET_46) & (up->type == CLK_ACUTIME)) {
 #ifdef DEBUG
@@ -854,7 +978,7 @@
 				printf ("Doing Position Fixes\n");
 				break;
 			    case 0x01:
-				printf ("Do no have GPS time yet\n");
+				printf ("Do not have GPS time yet\n");
 				break;
 			    case 0x03:
 				printf ("PDOP is too high\n");
@@ -899,6 +1023,73 @@
 		return 0;
 		}
 	}
+
+	/* Health Status for Copernicus II Receiver */
+	else if ((up->rpt_buf[0] == PACKET_46) && (up->type == CLK_COPERNICUS)) {
+#ifdef DEBUG
+		if (debug > 1)
+		/* Status Codes */
+			switch (mb(0)) {
+			    case 0x00:
+				printf ("Doing Position Fixes\n");
+				break;
+			    case 0x01:
+				printf ("Do not have GPS time yet\n");
+				break;
+			    case 0x03:
+				printf ("PDOP is too high\n");
+				break;
+			    case 0x04:
+				printf("The Chosen satellite is unusable\n");
+				break;
+			    case 0x08:
+				printf ("No usable satellites\n");
+				break;
+			    case 0x09:
+				printf ("Only 1 usable satellite\n");
+				break;
+			    case 0x0A:
+				printf ("Only 2 usable satellites\n");
+				break;
+			    case 0x0B:
+				printf ("Only 3 usable satellites\n");
+				break;
+			}
+#endif
+		/* Error Codes */
+		if ((mb(1) & 0x3E) != 0) {  /* Don't regard bits 0 and 6 as errors */
+			refclock_report(peer, CEVNT_BADTIME);
+			up->polled = -1;
+#ifdef DEBUG
+			if (debug > 1) {
+				if ((mb(1) & 0x18) == 0x08)
+					printf ("Antenna feed line fault (open)\n");
+				if ((mb(1) & 0x18) == 0x18)
+					printf ("Antenna feed line fault (short)\n");
+			}
+#endif
+		}
+		return 0;
+	}
+
+	/* Other packets output by ACE III & Copernicus II Receivers, dropped silently */
+	else if (((up->rpt_buf[0] == (char) 0x4A) ||
+		  (up->rpt_buf[0] == (char) 0x4B) ||
+		  (up->rpt_buf[0] == (char) 0x56) ||
+		  (up->rpt_buf[0] == (char) 0x5F) ||
+		  (up->rpt_buf[0] == (char) 0x6D) ||
+		  (up->rpt_buf[0] == (char) 0x82) ||
+		  (up->rpt_buf[0] == (char) 0x84)) &&
+		 ((up->type == CLK_ACE) || (up->type == CLK_COPERNICUS))) {
+#ifdef DEBUG
+		if ((debug > 1) && (up->type == CLK_ACE))
+			printf("TSIP_decode: Packet 0x%2x seen in ACE III mode\n", (up->rpt_buf[0] & 0XFF));
+		if ((debug > 1) && (up->type == CLK_COPERNICUS))
+			printf("TSIP_decode: Packet 0x%2x seen in Copernicus II mode\n", (up->rpt_buf[0] & 0XFF));
+#endif
+		return 0;
+	}
+
 	else if (up->rpt_buf[0] == 0x54)
 		return 0;
 
@@ -1188,9 +1379,19 @@
 {	
 	int x;	/* state before & after RTS set */
 	struct palisade_unit *up;
+	struct packettx tx;
 
 	up = pp->unitptr;
 
+	if (up->type == CLK_ACE) {
+		/* Poll by sending a 0x21 command */
+		tx.size = 0;
+		tx.data = (u_char *) emalloc(100);
+		sendcmd (&tx, 0x21);
+		sendetx (&tx, pp->io.fd);
+		free(tx.data);
+	} else {
+
 	/* read the current status, so we put things back right */
 	if (ioctl(pp->io.fd, TIOCMGET, &x) < 0) {
 		DPRINTF(1, ("Palisade HW_poll: unit %d: GET %m\n",
@@ -1219,9 +1420,12 @@
 
 	x &= ~TIOCM_RTS;        /* turn off RTS  */
 	
+	} /* (up->type != CLK_ACE) */
+
 	/* poll timestamp */
 	get_systime(&pp->lastrec);
 
+	if (up->type != CLK_ACE) {
 	if (ioctl(pp->io.fd, TIOCMSET, &x) == -1) {
 #ifdef DEBUG
 		if (debug)
@@ -1232,6 +1436,7 @@
 			up->unit);
 		return -1;
 	}
+	}
 
 	return 0;
 }
@@ -1298,6 +1503,31 @@
 	return (int32)(u_int32)ntohl(u32);
 }
 
+/*
+ * copy/swap a big-endian 32-bit single-precision floating point into a host 32-bit int
+ */
+static int32
+getsingle(
+	u_char *bp
+	)
+{
+	u_int32 mantissa;
+	int8_t exponent;
+	uint8_t sign, exp_field;
+	int32 res;
+
+	memcpy(&mantissa, bp, sizeof(mantissa));
+	mantissa = ((u_int32)ntohl(mantissa) & 0x7FFFFF) | 0x800000;
+	exp_field = ((uint8_t)bp[0] << 1) + ((uint8_t)bp[1] >> 7);
+	exponent = (int8_t)exp_field - 127;
+	sign = ((uint8_t)bp[0] >> 7);
+	if (exponent > 23)
+		res = (int32)(mantissa << (exponent - 23));
+	else
+		res = (int32)(mantissa >> (23 - exponent));
+	return sign ? -res : res;
+}
+
 #else	/* REFCLOCK && CLOCK_PALISADE*/
 int refclock_palisade_c_notempty;
 #endif
--- contrib/ntp/ntpd/refclock_palisade.h.orig
+++ contrib/ntp/ntpd/refclock_palisade.h
@@ -82,6 +82,7 @@
 #include "ntp_control.h"
 #include "ntp_refclock.h"
 #include "ntp_unixtime.h"
+#include "ntp_calgps.h"
 #include "ntp_stdlib.h"
 
 /*
@@ -98,6 +99,7 @@
  */
 #define	DEVICE		"/dev/palisade%d" 	/* device name and unit */
 #define	SPEED232	B9600		  	/* uart speed (9600 baud) */
+#define	SPEED232COP	B38400		  	/* uart speed for Copernicus II (38400 baud) */
 
 /*
  * TSIP Report Definitions
@@ -108,6 +110,8 @@
 #define LENCODE_8FAC    68      /* Length of Thunderbolt 8F-AC Position Packet*/
 #define LENCODE_8FAB    17      /* Length of Thunderbolt Primary Timing Packet*/
 
+#define LENCODE_41      10      /* Length of Copernicus II GPS Time Packet*/
+
 /* Allowed Sub-Packet ID's */
 #define PACKET_8F0B	0x0B
 #define PACKET_NTP	0xAD
@@ -187,11 +191,10 @@
 static	double	getdbl 			(u_char *);
 static	short	getint 			(u_char *);
 static	int32	getlong			(u_char *);
+static  int32   getsingle		(u_char *);
 
 
-#ifdef PALISADE_SENDCMD_RESURRECTED
 static  void	sendcmd			(struct packettx *buffer, int c);
-#endif
 static  void	sendsupercmd		(struct packettx *buffer, int c1, int c2);
 static  void	sendbyte		(struct packettx *buffer, int b);
 static  void	sendint			(struct packettx *buffer, int a);
--- contrib/ntp/ntpd/refclock_parse.c.orig
+++ contrib/ntp/ntpd/refclock_parse.c
@@ -3069,6 +3069,7 @@
 
 	parse->generic->fudgetime2 = 0.0;
 	parse->ppsphaseadjust = parse->generic->fudgetime2;
+	parse->generic->fudgeminjitter = 0.0;
 
 	parse->generic->clockdesc  = parse->parse_type->cl_description;
 
@@ -3424,6 +3425,8 @@
 #endif
 		    }
 		}
+
+		parse->generic->fudgeminjitter = in->fudgeminjitter;
 	}
 }
 
--- contrib/ntp/ntpd/refclock_zyfer.c.orig
+++ contrib/ntp/ntpd/refclock_zyfer.c
@@ -15,6 +15,7 @@
 #include "ntp_refclock.h"
 #include "ntp_stdlib.h"
 #include "ntp_unixtime.h"
+#include "ntp_calgps.h"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -211,6 +212,10 @@
 	int omode;		/* Operation mode */
 	u_char *p;
 
+	TCivilDate	tsdoy;
+	TNtpDatum	tsntp;
+	l_fp		tfrac;
+	
 	peer = rbufp->recv_peer;
 	pp = peer->procptr;
 	up = pp->unitptr;
@@ -283,11 +288,23 @@
 		return;
 	}
 
-	if (!refclock_process(pp)) {
-		refclock_report(peer, CEVNT_BADTIME);
-		return;
-        }
+	/* treat GPS input as subject to era warps */
+	ZERO(tsdoy);
+	ZERO(tfrac);
 
+	tsdoy.year    = pp->year;
+	tsdoy.yearday = pp->day;
+	tsdoy.hour    = pp->hour;
+	tsdoy.minute  = pp->minute;
+	tsdoy.second  = pp->second;
+	
+	/* note: We kept 'month' and 'monthday' zero above. That forces
+	 * day-of-year based calculation now:
+	 */
+	tsntp = gpsntp_from_calendar(&tsdoy, tfrac);
+	tfrac = ntpfp_from_ntpdatum(&tsntp);
+	refclock_process_offset(pp, tfrac, pp->lastrec, pp->fudgetime1);
+
 	/*
 	 * Good place for record_clock_stats()
 	 */
--- contrib/ntp/ntpdate/ntpdate.c.orig
+++ contrib/ntp/ntpdate/ntpdate.c
@@ -339,7 +339,11 @@
 	if (!ipv6_works)
 		ai_fam_templ = AF_INET;
 
-	errflg = 0;
+#ifdef HAVE_NETINFO
+	errflg = 0;		/* servers can come from netinfo */
+#else
+	errflg = (argc < 2);	/* need at least server on cmdline */
+#endif
 	progname = argv[0];
 	syslogit = 0;
 
@@ -1367,6 +1371,10 @@
 #endif
 
 	error = getaddrinfo(serv, service, &hints, &addrResult);
+	if (error == EAI_SERVICE) {
+		strlcpy(service, "123", sizeof(service));
+		error = getaddrinfo(serv, service, &hints, &addrResult);
+	}
 	if (error != 0) {
 		/* Conduct more refined error analysis */
 		if (error == EAI_FAIL || error == EAI_AGAIN){
@@ -1703,7 +1711,12 @@
 	hints.ai_flags = AI_PASSIVE;
 	hints.ai_socktype = SOCK_DGRAM;
 
-	if (getaddrinfo(NULL, service, &hints, &res) != 0) {
+	rc = getaddrinfo(NULL, service, &hints, &res);
+	if (rc == EAI_SERVICE) {
+		strlcpy(service, "123", sizeof(service));
+		rc = getaddrinfo(NULL, service, &hints, &res);
+	}
+	if (rc != 0) {
 		msyslog(LOG_ERR, "getaddrinfo() failed: %m");
 		exit(1);
 		/*NOTREACHED*/
@@ -1749,9 +1762,7 @@
 		/* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */
 		if (res->ai_family == AF_INET6)
 			if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) {
-				   msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
-					exit(1);
-					/*NOTREACHED*/
+				msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
 		}
 #endif
 
--- contrib/ntp/ntpdc/invoke-ntpdc.texi.orig
+++ contrib/ntp/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntpdc.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:56:51 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:11 PM by AutoGen 5.18.5
 # From the definitions    ntpdc-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -76,7 +76,7 @@
 
 @exampleindent 0
 @example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p14
 Usage:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
--- contrib/ntp/ntpdc/layout.std.orig
+++ contrib/ntp/ntpdc/layout.std
@@ -269,15 +269,17 @@
 offsetof(addr6) = 24
 offsetof(mask6) = 40
 
-sizeof(struct conf_restrict) = 52
+sizeof(struct conf_restrict) = 60
 offsetof(addr) = 0
 offsetof(mask) = 4
 offsetof(ippeerlimit) = 8
-offsetof(flags) = 10
-offsetof(mflags) = 12
-offsetof(v6_flag) = 16
-offsetof(addr6) = 20
-offsetof(mask6) = 36
+offsetof(srvfuzrft) = 12
+offsetof(flags) = 16
+offsetof(mflags) = 18
+offsetof(unused1) = 20
+offsetof(v6_flag) = 24
+offsetof(addr6) = 28
+offsetof(mask6) = 44
 
 sizeof(struct info_monitor_1) = 72
 offsetof(avg_int) = 0
--- contrib/ntp/ntpdc/ntpdc-opts.c.orig
+++ contrib/ntp/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:48 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:07 PM by AutoGen 5.18.5
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpdc program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -69,8 +69,8 @@
  *  static const strings for ntpdc options
  */
 static char const ntpdc_opt_strs[1914] =
-/*     0 */ "ntpdc 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "ntpdc 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -128,7 +128,7 @@
 /*  1695 */ "no-load-opts\0"
 /*  1708 */ "no\0"
 /*  1711 */ "NTPDC\0"
-/*  1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13\n"
+/*  1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
 /*  1848 */ "$HOME\0"
 /*  1854 */ ".\0"
@@ -135,7 +135,7 @@
 /*  1856 */ ".ntprc\0"
 /*  1863 */ "http://bugs.ntp.org, bugs@ntp.org\0"
 /*  1897 */ "\n\0"
-/*  1899 */ "ntpdc 4.2.8p13";
+/*  1899 */ "ntpdc 4.2.8p14";
 
 /**
  *  ipv4 option description with
@@ -796,8 +796,8 @@
      translate option names.
    */
   /* referenced via ntpdcOptions.pzCopyright */
-  puts(_("ntpdc 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("ntpdc 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -862,7 +862,7 @@
   puts(_("load options from a config file"));
 
   /* referenced via ntpdcOptions.pzUsageTitle */
-  puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13\n\
+  puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
 
   /* referenced via ntpdcOptions.pzExplain */
@@ -869,7 +869,7 @@
   puts(_("\n"));
 
   /* referenced via ntpdcOptions.pzFullVersion */
-  puts(_("ntpdc 4.2.8p13"));
+  puts(_("ntpdc 4.2.8p14"));
 
   /* referenced via ntpdcOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/ntpdc/ntpdc-opts.h.orig
+++ contrib/ntp/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:48 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:07 PM by AutoGen 5.18.5
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpdc program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -83,9 +83,9 @@
 /** count of all options for ntpdc */
 #define OPTION_CT    15
 /** ntpdc version */
-#define NTPDC_VERSION       "4.2.8p13"
+#define NTPDC_VERSION       "4.2.8p14"
 /** Full ntpdc version text */
-#define NTPDC_FULL_VERSION  "ntpdc 4.2.8p13"
+#define NTPDC_FULL_VERSION  "ntpdc 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/ntpdc/ntpdc.1ntpdcman.orig
+++ contrib/ntp/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpdc 1ntpdcman "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpdc 1ntpdcman "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:53 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:12 PM by AutoGen 5.18.5
 .\" From the definitions ntpdc-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -848,7 +848,7 @@
 .SH AUTHORS
 The formatting directives in this document came from FreeBSD.
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The
--- contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc.orig
+++ contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPDC 1ntpdcmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:50 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:10 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -787,7 +787,7 @@
 .Sh AUTHORS
 The formatting directives in this document came from FreeBSD.
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The
--- contrib/ntp/ntpdc/ntpdc.c.orig
+++ contrib/ntp/ntpdc/ntpdc.c
@@ -176,8 +176,8 @@
 static	char currenthost[LENHOSTNAME];			/* current host name */
 int showhostnames = 1;					/* show host names by default */
 
-static	int ai_fam_templ;				/* address family */
-static	int ai_fam_default;				/* default address family */
+static	int ai_fam_templ = AF_UNSPEC;		/* address family */
+static	int ai_fam_default = AF_UNSPEC;	/* default address family */
 static	SOCKET sockfd;					/* fd socket is opened on */
 static	int havehost = 0;				/* set to 1 when host open */
 int s_port = 0;
@@ -312,12 +312,12 @@
 	}
 
 	if (HAVE_OPT(IPV4))
-		ai_fam_templ = AF_INET;
+		ai_fam_default = AF_INET;
 	else if (HAVE_OPT(IPV6))
-		ai_fam_templ = AF_INET6;
-	else
-		ai_fam_templ = ai_fam_default;
+		ai_fam_default = AF_INET6;
 
+	ai_fam_templ = ai_fam_default;
+
 	if (HAVE_OPT(COMMAND)) {
 		int		cmdct = STACKCT_OPT( COMMAND );
 		const char**	cmds  = STACKLST_OPT( COMMAND );
@@ -1382,18 +1382,14 @@
 	arg_v *argp
 	)
 {
-	int isneg;
-	char *cp, *np;
-	static const char *digits = "0123456789";
-
 	ZERO(*argp);
 	argp->string = str;
 	argp->type   = code & ~OPT;
 
 	switch (argp->type) {
-	    case NTP_STR:
+	case NTP_STR:
 		break;
-	    case NTP_ADD:
+	case NTP_ADD:
 		if (!strcmp("-6", str)) {
 			ai_fam_templ = AF_INET6;
 			return -1;
@@ -1401,41 +1397,25 @@
 			ai_fam_templ = AF_INET;
 			return -1;
 		}
-		if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
+		if (!getnetnum(str, &(argp->netnum), (char *)0, ai_fam_templ)) {
 			return 0;
 		}
 		break;
-	    case NTP_INT:
-	    case NTP_UINT:
-		isneg = 0;
-		np = str;
-		if (*np == '-') {
-			np++;
-			isneg = 1;
+	case NTP_UINT:
+		if (!atouint(str, &argp->uval)) {
+			fprintf(stderr, "***Illegal unsigned value %s\n",
+				str);
+			return 0;
 		}
-
-		argp->uval = 0;
-		do {
-			cp = strchr(digits, *np);
-			if (cp == NULL) {
-				(void) fprintf(stderr,
-					       "***Illegal integer value %s\n", str);
-				return 0;
-			}
-			argp->uval *= 10;
-			argp->uval += (u_long)(cp - digits);
-		} while (*(++np) != '\0');
-
-		if (isneg) {
-			if ((code & ~OPT) == NTP_UINT) {
-				(void) fprintf(stderr,
-					       "***Value %s should be unsigned\n", str);
-				return 0;
-			}
-			argp->ival = -argp->ival;
+		break;
+	case NTP_INT:
+		if (!atoint(str, &argp->ival)) {
+			fprintf(stderr, "***Illegal integer value %s\n",
+				str);
+			return 0;
 		}
 		break;
-	    case IP_VERSION:
+	case IP_VERSION:
 		if (!strcmp("-6", str))
 			argp->ival = 6 ;
 		else if (!strcmp("-4", str))
@@ -1467,6 +1447,7 @@
 	struct addrinfo hints, *ai = NULL;
 
 	ZERO(hints);
+	hints.ai_family = af;
 	hints.ai_flags = AI_CANONNAME;
 #ifdef AI_ADDRCONFIG
 	hints.ai_flags |= AI_ADDRCONFIG;
@@ -1668,7 +1649,7 @@
 	} else {
 		if (pcmd->argval[0].ival < 0) {
 			isneg = 1;
-			val = (u_long)(-pcmd->argval[0].ival);
+			val = ~(u_long)(pcmd->argval[0].ival) + 1UL;
 		} else {
 			isneg = 0;
 			val = (u_long)pcmd->argval[0].ival;
--- contrib/ntp/ntpdc/ntpdc.html.orig
+++ contrib/ntp/ntpdc/ntpdc.html
@@ -64,7 +64,7 @@
 clock.  Run as root, it can correct the system clock to this offset as
 well.  It can be run as an interactive command or from a cron job.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntpdc</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntpdc</code>.
 </p>
 <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
 IETF specification.
@@ -214,7 +214,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p14
 Usage:  ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
--- contrib/ntp/ntpdc/ntpdc.man.in.orig
+++ contrib/ntp/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpdc @NTPDC_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpdc @NTPDC_MS@ "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:56:53 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:12 PM by AutoGen 5.18.5
 .\" From the definitions ntpdc-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -848,7 +848,7 @@
 .SH AUTHORS
 The formatting directives in this document came from FreeBSD.
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 The
--- contrib/ntp/ntpdc/ntpdc.mdoc.in.orig
+++ contrib/ntp/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPDC @NTPDC_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:50 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:10 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -787,7 +787,7 @@
 .Sh AUTHORS
 The formatting directives in this document came from FreeBSD.
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 The
--- contrib/ntp/ntpdc/ntpdc_ops.c.orig
+++ contrib/ntp/ntpdc/ntpdc_ops.c
@@ -40,7 +40,7 @@
  */
 static	void	peerlist	(struct parse *, FILE *);
 static	void	peers		(struct parse *, FILE *);
-static void	doconfig	(struct parse *pcmd, FILE *fp, int mode, int refc);
+static	void	doconfig	(struct parse *pcmd, FILE *fp, int mode, int refc);
 static	void	dmpeers		(struct parse *, FILE *);
 static	void	dopeers		(struct parse *, FILE *, int);
 static	void	printpeer	(struct info_peer *, FILE *);
@@ -260,7 +260,7 @@
 
 
 /*
- * SET_ADDRS - setup source and destination addresses for 
+ * SET_ADDRS - setup source and destination addresses for
  * v4/v6 as needed
  */
 #define SET_ADDRS(a1, a2, info, a1prefix, a2prefix)		\
@@ -359,9 +359,9 @@
 
 again:
 	res = doquery(impl_ver, REQ_PEER_LIST, 0, 0, 0, (char *)NULL, &items,
-		      &itemsize, (void *)&plist, 0, 
+		      &itemsize, (void *)&plist, 0,
 		      sizeof(struct info_peer_list));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -382,9 +382,16 @@
 		if ((pcmd->nargs == 0) ||
 		    ((pcmd->argval->ival == 6) && (plist->v6_flag != 0)) ||
 		    ((pcmd->argval->ival == 4) && (plist->v6_flag == 0)))
-			(void) fprintf(fp, "%-9s %s\n",
-				modetoa(plist->hmode),
-				nntohost(&paddr));
+		{
+			const char *strhost = nntohost(&paddr);
+			const char *straddr = stoa(&paddr);
+			(void) fprintf(fp, "%-12s %s",
+				modetoa(plist->hmode), strhost);
+			if (strcmp(strhost,straddr))
+				(void) fprintf(fp, " (%s)\n", straddr);
+			else
+				(void) fprintf(fp, "\n");
+		}
 		plist++;
 		items--;
 	}
@@ -439,9 +446,9 @@
 
 again:
 	res = doquery(impl_ver, REQ_PEER_LIST_SUM, 0, 0, 0, (char *)NULL,
-		      &items, &itemsize, (void *)&plist, 0, 
+		      &items, &itemsize, (void *)&plist, 0,
 		      sizeof(struct info_peer_summary));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -588,22 +595,24 @@
 	register int i;
 	l_fp tempts;
 	sockaddr_u srcadr, dstadr;
-	
+
 	SET_ADDRS(dstadr, srcadr, pp, dstadr, srcadr);
-	
+
 	(void) fprintf(fp, "remote %s, local %s\n",
 		       stoa(&srcadr), stoa(&dstadr));
 	(void) fprintf(fp, "hmode %s, pmode %s, stratum %d, precision %d\n",
 		       modetoa(pp->hmode), modetoa(pp->pmode),
 		       pp->stratum, pp->precision);
-	
+
 	(void) fprintf(fp,
 		       "leap %c%c, refid [%s], rootdistance %s, rootdispersion %s\n",
 		       pp->leap & 0x2 ? '1' : '0',
 		       pp->leap & 0x1 ? '1' : '0',
-		       refid_string(pp->refid, pp->stratum), fptoa(NTOHS_FP(pp->rootdelay), 5),
+		       refid_string(pp->refid,
+				    (pp->flags & INFO_FLAG_REFCLOCK ? 0 : pp->stratum)),
+		       fptoa(NTOHS_FP(pp->rootdelay), 5),
 		       ufptoa(NTOHS_FP(pp->rootdispersion), 5));
-	
+
 	(void) fprintf(fp,
 		       "ppoll %d, hpoll %d, keyid %lu, version %d, association %u\n",
 		       pp->ppoll, pp->hpoll, (u_long)pp->keyid, pp->version, ntohs(pp->associd));
@@ -614,9 +623,9 @@
 
 	(void) fprintf(fp, "boffset %s, ttl/mode %d\n",
 		       fptoa(NTOHS_FP(pp->estbdelay), 5), pp->ttl);
-	
+
 	(void) fprintf(fp, "timer %lds, flags", (long)ntohl(pp->timer));
-	print_pflag(fp, pp->flags); 
+	print_pflag(fp, pp->flags);
 
 	NTOHL_FP(&pp->reftime, &tempts);
 	(void) fprintf(fp, "reference time:      %s\n",
@@ -630,7 +639,7 @@
 	NTOHL_FP(&pp->xmt, &tempts);
 	(void) fprintf(fp, "transmit timestamp:  %s\n",
 		       prettydate(&tempts));
-	
+
 	(void) fprintf(fp, "filter delay: ");
 	for (i = 0; i < NTP_SHIFT; i++) {
 		(void) fprintf(fp, " %-8.8s",
@@ -656,8 +665,8 @@
 		    (void) fprintf(fp, "\n              ");
 	}
 	(void) fprintf(fp, "\n");
-	
 
+
 	NTOHL_FP(&pp->offset, &tempts);
 	(void) fprintf(fp,
 		       "offset %s, delay %s, error bound %s, filter error %s\n",
@@ -715,7 +724,7 @@
 	res = doquery(impl_ver, REQ_PEER_INFO, 0, qitems,
 		      sendsize, (char *)plist, &items,
 		      &itemsize, (void *)&pp, 0, sizeof(struct info_peer));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -790,9 +799,9 @@
 
 	res = doquery(impl_ver, REQ_PEER_STATS, 0, qitems,
 		      sendsize, (char *)plist, &items,
-		      &itemsize, (void *)&pp, 0, 
+		      &itemsize, (void *)&pp, 0,
 		      sizeof(struct info_peer_stats));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -890,9 +899,9 @@
 
 again:
 	res = doquery(impl_ver, REQ_LOOP_INFO, 0, 0, 0, (char *)NULL,
-		      &items, &itemsize, (void *)&il, 0, 
+		      &items, &itemsize, (void *)&il, 0,
 		      sizeof(struct info_loop));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -955,7 +964,7 @@
 	res = doquery(impl_ver, REQ_SYS_INFO, 0, 0, 0, (char *)NULL,
 		      &items, &itemsize, (void *)&is, 0,
 		      sizeof(struct info_sys));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1041,9 +1050,9 @@
 
 again:
 	res = doquery(impl_ver, REQ_SYS_STATS, 0, 0, 0, (char *)NULL,
-		      &items, &itemsize, (void *)&ss, 0, 
+		      &items, &itemsize, (void *)&ss, 0,
 		      sizeof(struct info_sys_stats));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1083,7 +1092,7 @@
 		(u_long)ntohl(ss->badauth));
 	if (itemsize != sizeof(struct info_sys_stats))
 	    return;
-	
+
 	fprintf(fp, "rate exceeded:          %lu\n",
 	       (u_long)ntohl(ss->limitrejected));
 }
@@ -1108,7 +1117,7 @@
 again:
 	res = doquery(impl_ver, REQ_IO_STATS, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&io, 0, sizeof(*io));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1169,7 +1178,7 @@
 again:
 	res = doquery(impl_ver, REQ_MEM_STATS, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&mem, 0, sizeof(*mem));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1226,7 +1235,7 @@
 again:
 	res = doquery(impl_ver, REQ_TIMER_STATS, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&tim, 0, sizeof(*tim));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1412,13 +1421,13 @@
 			version);
 		res = TRUE;
 	}
-	if (minpoll < NTP_MINPOLL || minpoll > NTP_MAXPOLL || 
-	    maxpoll < NTP_MINPOLL || maxpoll > NTP_MAXPOLL || 
+	if (minpoll < NTP_MINPOLL || minpoll > NTP_MAXPOLL ||
+	    maxpoll < NTP_MINPOLL || maxpoll > NTP_MAXPOLL ||
 	    minpoll > maxpoll) {
 		fprintf(fp, "***min/max-poll must be within %d..%d\n",
 			NTP_MINPOLL, NTP_MAXPOLL);
 		res = TRUE;
-	}					
+	}
 
 	if (res)
 		return;
@@ -1449,7 +1458,7 @@
 	res = doquery(impl_ver, REQ_CONFIG, 1, 1,
 		      sendsize, (char *)&cpeer, &items,
 		      &itemsize, &dummy, 0, sizeof(struct conf_peer));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1516,7 +1525,7 @@
 	res = doquery(impl_ver, REQ_UNCONFIG, 1, qitems,
 		      sendsize, (char *)plist, &items,
 		      &itemsize, &dummy, 0, sizeof(struct conf_unpeer));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1603,7 +1612,7 @@
 	res = doquery(impl_ver, req, 1, 1,
 		      sizeof(struct conf_sys_flags), (char *)&sys, &items,
 		      &itemsize, &dummy, 0, sizeof(struct conf_sys_flags));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1690,9 +1699,9 @@
 
 again:
 	res = doquery(impl_ver, REQ_GET_RESTRICT, 0, 0, 0, (char *)NULL,
-		      &items, &itemsize, (void *)&rl, 0, 
+		      &items, &itemsize, (void *)&rl, 0,
 		      sizeof(struct info_restrict));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1924,7 +1933,7 @@
 
 	res = doquery(impl_ver, req_code, 1, 1, sendsize, (char *)&cres,
 		      &items, &itemsize, &dummy, 0, sizeof(cres));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -1965,7 +1974,7 @@
 		      (version == 1 || version == -1) ? REQ_MON_GETLIST_1 :
 		      REQ_MON_GETLIST, 0, 0, 0, NULL,
 		      &items, &itemsize, &struct_star,
-		      (version < 0) ? (1 << INFO_ERR_REQ) : 0, 
+		      (version < 0) ? (1 << INFO_ERR_REQ) : 0,
 		      sizeof(struct info_monitor_1));
 
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
@@ -1973,11 +1982,11 @@
 		goto again;
 	}
 
-	if (res == INFO_ERR_REQ && version < 0) 
+	if (res == INFO_ERR_REQ && version < 0)
 		res = doquery(impl_ver, REQ_MON_GETLIST, 0, 0, 0, NULL,
 			      &items, &itemsize, &struct_star, 0,
 			      sizeof(struct info_monitor));
-	
+
 	if (res != 0)
 		return;
 
@@ -1997,9 +2006,9 @@
 			if ((pcmd->nargs == 0) ||
 			    ((pcmd->argval->ival == 6) && (m1->v6_flag != 0)) ||
 			    ((pcmd->argval->ival == 4) && (m1->v6_flag == 0)))
-				fprintf(fp, 
+				fprintf(fp,
 				    "%-22.22s %5d %-15s %8lu %1u %1u %6lx %6lu %7lu\n",
-				    nntohost(&addr), 
+				    nntohost(&addr),
 				    ntohs(m1->port),
 				    stoa(&dstadr),
 				    (u_long)ntohl(m1->count),
@@ -2124,7 +2133,7 @@
 	res = doquery(impl_ver, REQ_RESET_STATS, 1, 1,
 		      sizeof(struct reset_flags), (char *)&rflags, &items,
 		      &itemsize, &dummy, 0, sizeof(struct reset_flags));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2184,7 +2193,7 @@
 	res = doquery(impl_ver, REQ_RESET_PEER, 1, qitems,
 		      sendsize, (char *)plist, &items,
 		      &itemsize, &dummy, 0, sizeof(struct conf_unpeer));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2213,7 +2222,7 @@
 again:
 	res = doquery(impl_ver, REQ_REREAD_KEYS, 1, 0, 0, (char *)0,
 		      &items, &itemsize, &dummy, 0, sizeof(dummy));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2276,9 +2285,9 @@
 
 again:
 	res = doquery(impl_ver, req, 1, ritems, sizeof(u_long),
-		      (char *)keyids, &items, &itemsize, &dummy, 0, 
+		      (char *)keyids, &items, &itemsize, &dummy, 0,
 		      sizeof(dummy));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2309,7 +2318,7 @@
 again:
 	res = doquery(impl_ver, REQ_AUTHINFO, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&ia, 0, sizeof(*ia));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2366,7 +2375,7 @@
 again:
 	res = doquery(impl_ver, REQ_TRAPS, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&it, 0, sizeof(*it));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2399,7 +2408,7 @@
 			fprintf(fp, "low priority\n");
 		else
 			fprintf(fp, "normal priority\n");
-		
+
 		fprintf(fp, "set for %ld secs, last set %ld secs ago\n",
 			(long)ntohl(it->origtime),
 			(long)ntohl(it->settime));
@@ -2492,9 +2501,9 @@
 	}
 
 	res = doquery(impl_ver, req, 1, 1, sendsize,
-		      (char *)&ctrap, &items, &itemsize, &dummy, 0, 
+		      (char *)&ctrap, &items, &itemsize, &dummy, 0,
 		      sizeof(struct conf_trap));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2555,9 +2564,9 @@
 
 again:
 	res = doquery(impl_ver, req, 1, 1, sizeof(u_int32),
-		      (char *)&key, &items, &itemsize, &dummy, 0, 
+		      (char *)&key, &items, &itemsize, &dummy, 0,
 		      sizeof(dummy));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2588,7 +2597,7 @@
 again:
 	res = doquery(impl_ver, REQ_GET_CTLSTATS, 0, 0, 0, NULL, &items,
 		      &itemsize, (void *)&ic, 0, sizeof(*ic));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2664,7 +2673,7 @@
 	res = doquery(impl_ver, REQ_GET_CLOCKINFO, 0, qitems,
 		      sizeof(u_int32), (char *)clist, &items,
 		      &itemsize, (void *)&cl, 0, sizeof(struct info_clock));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2847,7 +2856,7 @@
 	res = doquery(impl_ver, REQ_GET_CLKBUGINFO, 0, qitems,
 		      sizeof(u_int32), (char *)clist, &items,
 		      &itemsize, (void *)&cl, 0, sizeof(struct info_clkbug));
-	
+
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
 		impl_ver = IMPL_XNTPD_OLD;
 		goto again;
@@ -2933,7 +2942,7 @@
 
 again:
 	res = doquery(impl_ver, REQ_GET_KERNEL, 0, 0, 0, (char *)NULL,
-		      &items, &itemsize, (void *)&ik, 0, 
+		      &items, &itemsize, (void *)&ik, 0,
 		      sizeof(struct info_kernel));
 
 	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
@@ -3078,9 +3087,9 @@
 
 	fprintf(fp, IF_LIST_FMT_STR, IF_LIST_LABELS);
 	fprintf(fp, IF_LIST_LINE);
-	
+
 	while (items > 0) {
-		SET_ADDR(saddr, ntohl(ifs->v6_flag), 
+		SET_ADDR(saddr, ntohl(ifs->v6_flag),
 			 ifs->unaddr.addr.s_addr, ifs->unaddr.addr6);
 		fprintf(fp, IF_LIST_FMT,
 			ntohl(ifs->ifnum),
@@ -3098,12 +3107,12 @@
 			(u_long)ntohl(ifs->peercnt),
 			(u_long)ntohl(ifs->uptime));
 
-		SET_ADDR(saddr, ntohl(ifs->v6_flag), 
+		SET_ADDR(saddr, ntohl(ifs->v6_flag),
 			 ifs->unmask.addr.s_addr, ifs->unmask.addr6);
 		fprintf(fp, IF_LIST_AFMT_STR, stoa(&saddr), 'M');
 
 		if (!ntohl(ifs->v6_flag) && ntohl(ifs->flags) & (INT_BCASTOPEN)) {
-			SET_ADDR(saddr, ntohl(ifs->v6_flag), 
+			SET_ADDR(saddr, ntohl(ifs->v6_flag),
 				 ifs->unbcast.addr.s_addr, ifs->unbcast.addr6);
 			fprintf(fp, IF_LIST_AFMT_STR, stoa(&saddr), 'B');
 
@@ -3127,7 +3136,7 @@
 	int res;
 
 	res = doquery(impl_ver, REQ_IF_STATS, 1, 0, 0, (char *)NULL, &items,
-		      &itemsize, (void *)&ifs, 0, 
+		      &itemsize, (void *)&ifs, 0,
 		      sizeof(struct info_if_stats));
 	iflist(fp, ifs, items, itemsize, res);
 }
@@ -3145,7 +3154,7 @@
 	int res;
 
 	res = doquery(impl_ver, REQ_IF_RELOAD, 1, 0, 0, (char *)NULL, &items,
-		      &itemsize, (void *)&ifs, 0, 
+		      &itemsize, (void *)&ifs, 0,
 		      sizeof(struct info_if_stats));
 	iflist(fp, ifs, items, itemsize, res);
 }
--- contrib/ntp/ntpq/Makefile.am.orig
+++ contrib/ntp/ntpq/Makefile.am
@@ -22,16 +22,18 @@
 ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
 ntpq_LDADD += $(LDADD_NTP)
 ntpq_LDADD += $(NTP_HARD_LDFLAGS)
-noinst_HEADERS=	ntpq.h
-noinst_LIBRARIES=	libntpq.a
-libntpq_a_CFLAGS=	$(AM_CFLAGS)
-libntpq_a_CFLAGS+=	-DNO_MAIN_ALLOWED -DBUILD_AS_LIB
-libntpq_a_CPPFLAGS=	$(AM_CPPFLAGS)
-libntpq_a_LDFLAGS=	$(AM_LDFLAGS)
-CLEANFILES=
-DISTCLEANFILES=	.version version.c config.log $(man_MANS)
-ETAGS_ARGS=	Makefile.am
-EXTRA_DIST=			\
+
+noinst_HEADERS =	ntpq.h
+
+noinst_LIBRARIES =	libntpq.a
+libntpq_a_CFLAGS =	$(AM_CFLAGS)
+libntpq_a_CFLAGS +=	-DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+libntpq_a_CPPFLAGS =	$(AM_CPPFLAGS)
+
+CLEANFILES =
+DISTCLEANFILES =	.version version.c config.log $(man_MANS)
+ETAGS_ARGS =	Makefile.am
+EXTRA_DIST =			\
 	invoke-ntpq.menu	\
 	invoke-ntpq.texi	\
 	ntpq-opts.def		\
@@ -78,7 +80,7 @@
 
 $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
 	@: do-nothing action to avoid default SCCS get, .h built with .c
-	
+
 $(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
 	$(run_ag) ntpq-opts.def
 
@@ -110,7 +112,7 @@
 
 $(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
 	@: do-nothing action to avoid default SCCS get, .menu built with .texi
-	
+
 $(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
 	$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
 	$(top_srcdir)/scripts/build/check--help $@
@@ -127,7 +129,7 @@
 
 version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
 	env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
-	
+
 version.o: version.c
 	env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
 
--- contrib/ntp/ntpq/Makefile.in.orig
+++ contrib/ntp/ntpq/Makefile.in
@@ -553,7 +553,6 @@
 noinst_LIBRARIES = libntpq.a
 libntpq_a_CFLAGS = $(AM_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
 libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
-libntpq_a_LDFLAGS = $(AM_LDFLAGS)
 CLEANFILES = check-libopts check-libntp .deps-ver
 DISTCLEANFILES = .version version.c config.log $(man_MANS)
 ETAGS_ARGS = Makefile.am
--- contrib/ntp/ntpq/invoke-ntpq.texi.orig
+++ contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntpq.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:01 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:21 PM by AutoGen 5.18.5
 # From the definitions    ntpq-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -944,7 +944,7 @@
 
 @exampleindent 0
 @example
-ntpq - standard NTP query program - Ver. 4.2.8p13
+ntpq - standard NTP query program - Ver. 4.2.8p14
 Usage:  ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 name resolution
--- contrib/ntp/ntpq/ntpq-opts.c.orig
+++ contrib/ntp/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:54 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:14 PM by AutoGen 5.18.5
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpq program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -69,8 +69,8 @@
  *  static const strings for ntpq options
  */
 static char const ntpq_opt_strs[1977] =
-/*     0 */ "ntpq 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "ntpq 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -132,13 +132,13 @@
 /*  1768 */ "no-load-opts\0"
 /*  1781 */ "no\0"
 /*  1784 */ "NTPQ\0"
-/*  1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p13\n"
+/*  1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
 /*  1909 */ "$HOME\0"
 /*  1915 */ ".\0"
 /*  1917 */ ".ntprc\0"
 /*  1924 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/*  1958 */ "ntpq 4.2.8p13\0"
+/*  1958 */ "ntpq 4.2.8p14\0"
 /*  1972 */ "hash";
 
 /**
@@ -841,8 +841,8 @@
      translate option names.
    */
   /* referenced via ntpqOptions.pzCopyright */
-  puts(_("ntpq 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("ntpq 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -910,11 +910,11 @@
   puts(_("load options from a config file"));
 
   /* referenced via ntpqOptions.pzUsageTitle */
-  puts(_("ntpq - standard NTP query program - Ver. 4.2.8p13\n\
+  puts(_("ntpq - standard NTP query program - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
 
   /* referenced via ntpqOptions.pzFullVersion */
-  puts(_("ntpq 4.2.8p13"));
+  puts(_("ntpq 4.2.8p14"));
 
   /* referenced via ntpqOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/ntpq/ntpq-opts.h.orig
+++ contrib/ntp/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:56:54 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:14 PM by AutoGen 5.18.5
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpq program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -84,9 +84,9 @@
 /** count of all options for ntpq */
 #define OPTION_CT    16
 /** ntpq version */
-#define NTPQ_VERSION       "4.2.8p13"
+#define NTPQ_VERSION       "4.2.8p14"
 /** Full ntpq version text */
-#define NTPQ_FULL_VERSION  "ntpq 4.2.8p13"
+#define NTPQ_FULL_VERSION  "ntpq 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/ntpq/ntpq-subs.c.orig
+++ contrib/ntp/ntpq/ntpq-subs.c
@@ -84,7 +84,7 @@
  */
 struct xcmd opcmds[] = {
 	{ "saveconfig", saveconfig, { NTP_STR, NO, NO, NO },
-		{ "filename", "", "", ""}, 
+		{ "filename", "", "", ""},
 		"save ntpd configuration to file, . for current config file"},
 	{ "associations", associations, {  NO, NO, NO, NO },
 	  { "", "", "", "" },
@@ -358,6 +358,10 @@
 static void	collect_display_vdc(associd_t as, vdc *table,
 				    int decodestatus, FILE *fp);
 
+static	int	xprintf(FILE *,	char const *, ...) NTP_PRINTF(2, 3);
+static	int	xputs(char const *, FILE *);
+static	int	xputc(int, FILE *);
+
 /*
  * static globals
  */
@@ -383,6 +387,43 @@
 };
 
 /*
+ * NULL-pointer safe FILE I/O: use stderr if no file supplied.
+ */
+static	int
+xprintf(
+	FILE *		ofp,
+	char const *	fmt,
+	...
+	)
+{
+	va_list	va;
+	int	rc;
+
+	va_start(va, fmt);
+	rc = vfprintf((ofp ? ofp : stderr), fmt, va);
+	va_end(va);
+	return rc;
+}
+
+static	int
+xputs(
+	char const *	str,
+	FILE *		ofp
+	)
+{
+	return fputs(str, (ofp ? ofp : stderr));
+}
+
+static	int
+xputc(
+	int	ch,
+	FILE *	ofp
+	)
+{
+	return fputc(ch, (ofp ? ofp : stderr));
+}
+
+/*
  * checkassocid - return the association ID, checking to see if it is valid
  */
 static associd_t
@@ -396,7 +437,7 @@
 	associd = (associd_t)value;
 	if (0 == associd || value != associd) {
 		ulvalue = value;
-		fprintf(stderr,
+		xprintf(stderr,
 			"***Invalid association ID %lu specified\n",
 			ulvalue);
 		return 0;
@@ -449,7 +490,7 @@
 		INSIST(name && value);
 		vl = findlistvar(vlist, name);
 		if (NULL == vl) {
-			fprintf(stderr, "Variable list full\n");
+			xprintf(stderr, "Variable list full\n");
 			return;
 		}
 
@@ -485,7 +526,7 @@
 		INSIST(name && value);
 		vl = findlistvar(vlist, name);
 		if (vl == 0 || vl->name == 0) {
-			(void) fprintf(stderr, "Variable `%s' not found\n",
+			(void) xprintf(stderr, "Variable `%s' not found\n",
 				       name);
 		} else {
 			free((void *)(intptr_t)vl->name);
@@ -549,7 +590,7 @@
 			valuelen = strlen(vl->value);
 		totallen = namelen + valuelen + (valuelen != 0) + (cp != data);
 		if (cp + totallen > cpend) {
-		    fprintf(stderr, 
+		    xprintf(stderr,
 			    "***Ignoring variables starting with `%s'\n",
 			    vl->name);
 		    break;
@@ -606,14 +647,14 @@
 	size_t n;
 
 	if (NULL == vlist->name) {
-		fprintf(fp, "No variables on list\n");
+		xprintf(fp, "No variables on list\n");
 		return;
 	}
 	for (n = 0; n < MAXLIST && vlist[n].name != NULL; n++) {
 		if (NULL == vlist[n].value)
-			fprintf(fp, "%s\n", vlist[n].name);
+			xprintf(fp, "%s\n", vlist[n].name);
 		else
-			fprintf(fp, "%s=%s\n", vlist[n].name,
+			xprintf(fp, "%s=%s\n", vlist[n].name,
 				vlist[n].value);
 	}
 }
@@ -707,13 +748,13 @@
 		return 0;
 
 	if (numhosts > 1)
-		fprintf(fp, "server=%s ", currenthost);
+		xprintf(fp, "server=%s ", currenthost);
 	if (dsize == 0) {
 		if (associd == 0)
-			fprintf(fp, "No system%s variables returned\n",
+			xprintf(fp, "No system%s variables returned\n",
 				(type == TYPE_CLOCK) ? " clock" : "");
 		else
-			fprintf(fp,
+			xprintf(fp,
 				"No information returned for%s association %u\n",
 				(type == TYPE_CLOCK) ? " clock" : "",
 				associd);
@@ -721,7 +762,7 @@
 	}
 
 	if (!quiet)
-		fprintf(fp, "associd=%u ", associd);
+		xprintf(fp, "associd=%u ", associd);
 	printvars(dsize, datap, (int)rstatus, type, quiet, fp);
 	return 1;
 }
@@ -788,11 +829,11 @@
 		return;
 
 	if (numhosts > 1)
-		(void) fprintf(fp, "server=%s ", currenthost);
+		(void) xprintf(fp, "server=%s ", currenthost);
 	if (dsize == 0)
-		(void) fprintf(fp, "done! (no data returned)\n");
+		(void) xprintf(fp, "done! (no data returned)\n");
 	else {
-		(void) fprintf(fp,"associd=%u ", associd);
+		(void) xprintf(fp,"associd=%u ", associd);
 		printvars(dsize, datap, (int)rstatus,
 			  (associd != 0) ? TYPE_PEER : TYPE_SYS, 0, fp);
 	}
@@ -873,11 +914,11 @@
 		return;
 
 	if (numhosts > 1)
-		fprintf(fp, "server=%s ", currenthost);
+		xprintf(fp, "server=%s ", currenthost);
 	if (dsize == 0)
-		fprintf(fp, "done! (no data returned)\n");
+		xprintf(fp, "done! (no data returned)\n");
 	else {
-		fprintf(fp,"associd=%u ", associd);
+		xprintf(fp,"associd=%u ", associd);
 		type = (0 == associd)
 			   ? TYPE_SYS
 			   : TYPE_PEER;
@@ -976,7 +1017,7 @@
 	}
 	for (a = 0; a < COUNTOF(assids); a++)
 		if (-1 == ind[a]) {
-			fprintf(stderr,
+			xprintf(stderr,
 				"***Association ID %u not found in list\n",
 				assids[a]);
 			return 0;
@@ -1013,7 +1054,7 @@
 
 	for (i = from; i <= to; i++) {
 		if (i != from)
-			fprintf(fp, "\n");
+			xprintf(fp, "\n");
 		if (!dolist(g_varlist, assoc_cache[i].assid,
 			    CTL_OP_READVAR, TYPE_PEER, fp))
 			return;
@@ -1084,15 +1125,15 @@
 
 	if (dsize == 0) {
 		if (numhosts > 1)
-			fprintf(fp, "server=%s ", currenthost);
-		fprintf(fp, "No association ID's returned\n");
+			xprintf(fp, "server=%s ", currenthost);
+		xprintf(fp, "No association ID's returned\n");
 		return 0;
 	}
 
 	if (dsize & 0x3) {
 		if (numhosts > 1)
-			fprintf(stderr, "server=%s ", currenthost);
-		fprintf(stderr,
+			xprintf(stderr, "server=%s ", currenthost);
+		xprintf(stderr,
 			"***Server returned %zu octets, should be multiple of 4\n",
 			dsize);
 		return 0;
@@ -1112,13 +1153,13 @@
 		datap += sizeof(*pus);
 		dsize -= 2 * sizeof(*pus);
 		if (debug) {
-			fprintf(stderr, "[%u] ",
+			xprintf(stderr, "[%u] ",
 				assoc_cache[numassoc].assid);
 		}
 		numassoc++;
 	}
 	if (debug) {
-		fprintf(stderr, "\n%d associations total\n", numassoc);
+		xprintf(stderr, "\n%d associations total\n", numassoc);
 	}
 	sortassoc();
 	return 1;
@@ -1147,7 +1188,7 @@
 	char buf[128];
 
 	if (numassoc == 0) {
-		(void) fprintf(fp, "No association ID's in list\n");
+		(void) xprintf(fp, "No association ID's in list\n");
 		return;
 	}
 
@@ -1154,9 +1195,9 @@
 	/*
 	 * Output a header
 	 */
-	(void) fprintf(fp,
+	(void) xprintf(fp,
 			   "ind assid status  conf reach auth condition  last_event cnt\n");
-	(void) fprintf(fp,
+	(void) xprintf(fp,
 			   "===========================================================\n");
 	for (i = 0; i < numassoc; i++) {
 		statval = (u_char) CTL_PEER_STATVAL(assoc_cache[i].status);
@@ -1307,7 +1348,7 @@
 		while (bp > buf && ' ' == bp[-1])
 			--bp;
 		bp[0] = '\0';
-		fprintf(fp, "%s\n", buf);
+		xprintf(fp, "%s\n", buf);
 	}
 }
 
@@ -1386,7 +1427,7 @@
 
 	if (0 == pcmd->nargs)
 		return;
-	
+
 	res = doquery(CTL_OP_SAVECONFIG, 0, 1,
 		      strlen(pcmd->argval[0].string),
 		      pcmd->argval[0].string, &rstatus, &dsize,
@@ -1396,9 +1437,9 @@
 		return;
 
 	if (0 == dsize)
-		fprintf(fp, "(no response message, curiously)");
+		xprintf(fp, "(no response message, curiously)");
 	else
-		fprintf(fp, "%.*s", (int)dsize, datap); /* cast is wobbly */
+		xprintf(fp, "%.*s", (int)dsize, datap); /* cast is wobbly */
 }
 
 
@@ -1425,9 +1466,9 @@
 		return;
 
 	if (numhosts > 1)
-		(void) fprintf(fp, "server=%s ", currenthost);
+		(void) xprintf(fp, "server=%s ", currenthost);
 	if (dsize == 0) {
-		(void) fprintf(fp, "No radio status string returned\n");
+		(void) xprintf(fp, "No radio status string returned\n");
 		return;
 	}
 
@@ -1654,7 +1695,7 @@
 	 * data for it...
 	 */
 	get_systime(&ts);
-	
+
 	have_srchost = FALSE;
 	have_dstadr = FALSE;
 	have_da_rid = FALSE;
@@ -1672,7 +1713,7 @@
 		if (!strcmp("srcadr", name) ||
 		    !strcmp("peeradr", name)) {
 			if (!decodenetnum(value, &srcadr))
-				fprintf(stderr, "malformed %s=%s\n",
+				xprintf(stderr, "malformed %s=%s\n",
 					name, value);
 		} else if (!strcmp("srchost", name)) {
 			if (pvl == peervarlist || pvl == apeervarlist) {
@@ -1733,7 +1774,7 @@
 					ZERO(u32);
 					memcpy(&u32, value, drlen);
 					dstadr_refid = refid_str(u32, 1);
-					//fprintf(stderr, "apeervarlist S1 refid: value=<%s>\n", value);
+					//xprintf(stderr, "apeervarlist S1 refid: value=<%s>\n", value);
 				} else if (decodenetnum(value, &refidadr)) {
 					if (SOCK_UNSPEC(&refidadr))
 						dstadr_refid = "0.0.0.0";
@@ -1747,9 +1788,9 @@
 						snprintf(buf, 10,
 							"%0x", i);
 						dstadr_refid = buf;
-					//fprintf(stderr, "apeervarlist refid: value=<%x>\n", i);
+					//xprintf(stderr, "apeervarlist refid: value=<%x>\n", i);
 					}
-					//fprintf(stderr, "apeervarlist refid: value=<%s>\n", value);
+					//xprintf(stderr, "apeervarlist refid: value=<%s>\n", value);
 				} else {
 					have_da_rid = FALSE;
 				}
@@ -1786,7 +1827,7 @@
 		} else if (!strcmp("flash", name)) {
 		    decodeuint(value, &flash);
 		} else {
-			// fprintf(stderr, "UNRECOGNIZED name=%s ", name);
+			// xprintf(stderr, "UNRECOGNIZED name=%s ", name);
 		}
 	}
 
@@ -1850,7 +1891,7 @@
 			else
 				serverlocal = currenthost;
 		}
-		fprintf(fp, "%-*s ", (int)maxhostlen, serverlocal);
+		xprintf(fp, "%-*s ", (int)maxhostlen, serverlocal);
 	}
 	if (AF_UNSPEC == af || AF(&srcadr) == af) {
 		if (!have_srchost)
@@ -1859,13 +1900,13 @@
 		/* wide and long source - space over on next line */
 		/* allow for host + sp if > 1 and regular tally + source + sp */
 		if (wideremote && 15 < strlen(clock_name))
-			fprintf(fp, "%c%s\n%*s", c, clock_name,
+			xprintf(fp, "%c%s\n%*s", c, clock_name,
 				((numhosts > 1) ? (int)maxhostlen + 1 : 0)
 							+ 1 + 15 + 1, "");
 		else
-			fprintf(fp, "%c%-15.15s ", c, clock_name);
+			xprintf(fp, "%c%-15.15s ", c, clock_name);
 		if ((flash & TEST12) && (pvl != opeervarlist)) {
-			drlen = fprintf(fp, "(loop)");
+			drlen = xprintf(fp, "(loop)");
 		} else if (!have_da_rid) {
 			drlen = 0;
 		} else {
@@ -1874,24 +1915,24 @@
 		}
 		if (pvl == apeervarlist) {
 			while (drlen++ < 9)
-				fputc(' ', fp);
-			fprintf(fp, "%-6d", associd);
+				xputc(' ', fp);
+			xprintf(fp, "%-6d", associd);
 		} else {
 			while (drlen++ < 15)
-				fputc(' ', fp);
+				xputc(' ', fp);
 		}
-		fprintf(fp,
+		xprintf(fp,
 			" %2ld %c %4.4s %4.4s  %3lo  %7.7s %8.7s %7.7s\n",
 			stratum, type,
 			prettyinterval(whenbuf, sizeof(whenbuf),
 				       when(&ts, &rec, &reftime)),
-			prettyinterval(pollbuf, sizeof(pollbuf), 
+			prettyinterval(pollbuf, sizeof(pollbuf),
 				       (int)poll_sec),
-			reach, lfptoms(&estdelay, 3),
+			reach, ulfptoms(&estdelay, 3),
 			lfptoms(&estoffset, 3),
 			(have_jitter)
-			    ? lfptoms(&estjitter, 3)
-			    : lfptoms(&estdisp, 3));
+			    ? ulfptoms(&estjitter, 3)
+			    : ulfptoms(&estdisp, 3));
 		return (1);
 	}
 	else
@@ -1932,8 +1973,8 @@
 
 	if (dsize == 0) {
 		if (numhosts > 1)
-			fprintf(stderr, "server=%s ", currenthost);
-		fprintf(stderr,
+			xprintf(stderr, "server=%s ", currenthost);
+		xprintf(stderr,
 			"***No information returned for association %u\n",
 			associd);
 		return 0;
@@ -1971,14 +2012,14 @@
 		}
 	}
 	if (numhosts > 1)
-		fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+		xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
 			"server (local)");
-	fprintf(fp,
+	xprintf(fp,
 		"     remote           refid      st t when poll reach   delay   offset  jitter\n");
 	if (numhosts > 1)
 		for (u = 0; u <= maxhostlen; u++)
-			fprintf(fp, "=");
-	fprintf(fp,
+			xprintf(fp, "=");
+	xprintf(fp,
 		"==============================================================================\n");
 
 	for (u = 0; u < numassoc; u++) {
@@ -1986,7 +2027,7 @@
 		    !(CTL_PEER_STATVAL(assoc_cache[u].status)
 		      & (CTL_PST_CONFIG|CTL_PST_REACH))) {
 			if (debug)
-				fprintf(stderr, "eliding [%d]\n",
+				xprintf(stderr, "eliding [%d]\n",
 					(int)assoc_cache[u].assid);
 			continue;
 		}
@@ -2025,14 +2066,14 @@
 		}
 	}
 	if (numhosts > 1)
-		fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+		xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
 			"server (local)");
-	fprintf(fp,
+	xprintf(fp,
 		"     remote       refid   assid  st t when poll reach   delay   offset  jitter\n");
 	if (numhosts > 1)
 		for (u = 0; u <= maxhostlen; u++)
-			fprintf(fp, "=");
-	fprintf(fp,
+			xprintf(fp, "=");
+	xprintf(fp,
 		"==============================================================================\n");
 
 	for (u = 0; u < numassoc; u++) {
@@ -2040,7 +2081,7 @@
 		    !(CTL_PEER_STATVAL(assoc_cache[u].status)
 		      & (CTL_PST_CONFIG|CTL_PST_REACH))) {
 			if (debug)
-				fprintf(stderr, "eliding [%d]\n",
+				xprintf(stderr, "eliding [%d]\n",
 					(int)assoc_cache[u].assid);
 			continue;
 		}
@@ -2145,14 +2186,14 @@
 				maxhostlen = strlen(fullname);
 	}
 	if (numhosts > 1)
-		fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+		xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
 			"server");
-	fprintf(fp,
+	xprintf(fp,
 	    "     remote           local      st t when poll reach   delay   offset    disp\n");
 	if (numhosts > 1)
 		for (i = 0; i <= maxhostlen; ++i)
-			fprintf(fp, "=");
-	fprintf(fp,
+			xprintf(fp, "=");
+	xprintf(fp,
 	    "==============================================================================\n");
 
 	for (i = 0; i < numassoc; i++) {
@@ -2211,10 +2252,10 @@
 }
 
 
-/* 
+/*
  * config - send a configuration command to a remote host
  */
-static void 
+static void
 config (
 	struct parse *pcmd,
 	FILE *fp
@@ -2232,7 +2273,7 @@
 	cfgcmd = pcmd->argval[0].string;
 
 	if (debug > 2)
-		fprintf(stderr, 
+		xprintf(stderr,
 			"In Config\n"
 			"Keyword = %s\n"
 			"Command = %s\n", pcmd->keyword, cfgcmd);
@@ -2255,12 +2296,12 @@
 	if (1 == sscanf(resp, "column %d syntax error", &col)
 	    && col >= 0 && (size_t)col <= strlen(cfgcmd) + 1) {
 		if (interactive)
-			fputs("             *", stdout); /* "ntpq> :config " */
+			xputs("             *", stdout); /* "ntpq> :config " */
 		else
 			printf("%s\n", cfgcmd);
 		for (i = 0; i < col; i++)
-			fputc('_', stdout);
-		fputs("^\n", stdout);
+			xputc('_', stdout);
+		xputs("^\n", stdout);
 	}
 	printf("%s\n", resp);
 	free(resp);
@@ -2267,15 +2308,15 @@
 }
 
 
-/* 
+/*
  * config_from_file - remotely configure an ntpd daemon using the
  * specified configuration file
  * SK: This function is a kludge at best and is full of bad design
  * bugs:
  * 1. ntpq uses UDP, which means that there is no guarantee of in-order,
- *    error-free delivery. 
+ *    error-free delivery.
  * 2. The maximum length of a packet is constrained, and as a result, the
- *    maximum length of a line in a configuration file is constrained. 
+ *    maximum length of a line in a configuration file is constrained.
  *    Longer lines will lead to unpredictable results.
  * 3. Since this function is sending a line at a time, we can't update
  *    the control key through the configuration file (YUCK!!)
@@ -2284,7 +2325,7 @@
  * on the assumption that 'int' can hold the size of the involved
  * buffers without overflow.
  */
-static void 
+static void
 config_from_file (
 	struct parse *pcmd,
 	FILE *fp
@@ -2302,7 +2343,7 @@
 	int retry_limit;
 
 	if (debug > 2)
-		fprintf(stderr,
+		xprintf(stderr,
 			"In Config\n"
 			"Keyword = %s\n"
 			"Filename = %s\n", pcmd->keyword,
@@ -2323,7 +2364,7 @@
 		config_len = (NULL != cp)
 		    ? (size_t)(cp - config_cmd)
 		    : strlen(config_cmd);
-		
+
 		/* [Bug 3015] make sure there's no trailing whitespace;
 		 * the fix for [Bug 2853] on the server side forbids
 		 * those. And don't transmit empty lines, as this would
@@ -2339,7 +2380,7 @@
 			continue;
 
 		retry_limit = 2;
-		do 
+		do
 			res = doquery(CTL_OP_CONFIGURE, 0, 1,
 				      config_len, config_cmd,
 				      &rstatus, &rsize, &rdata);
@@ -2386,13 +2427,13 @@
 	qres = doquery(CTL_OP_REQ_NONCE, 0, 0, 0, NULL, &rstatus,
 		       &rsize, &rdata);
 	if (qres) {
-		fprintf(stderr, "nonce request failed\n");
+		xprintf(stderr, "nonce request failed\n");
 		return FALSE;
 	}
 
 	if ((size_t)rsize <= sizeof(nonce_eq) - 1 ||
 	    strncmp(rdata, nonce_eq, sizeof(nonce_eq) - 1)) {
-		fprintf(stderr, "unexpected nonce response format: %.*s\n",
+		xprintf(stderr, "unexpected nonce response format: %.*s\n",
 			(int)rsize, rdata); /* cast is wobbly */
 		return FALSE;
 	}
@@ -2406,7 +2447,7 @@
 		chars--;
 		nonce[chars] = '\0';
 	}
-	
+
 	return TRUE;
 }
 
@@ -2433,7 +2474,7 @@
 			break;
 	if (mon != NULL) {
 		if (!L_ISGEQ(&add->first, &mon->first)) {
-			fprintf(stderr,
+			xprintf(stderr,
 				"add_mru duplicate %s new first ts %08x.%08x precedes prior %08x.%08x\n",
 				sptoa(&add->addr), add->last.l_ui,
 				add->last.l_uf, mon->last.l_ui,
@@ -2523,7 +2564,7 @@
 	l_fp last_older;
 	sockaddr_u addr_older;
 	int have_now;
-	int have_addr_older; 
+	int have_addr_older;
 	int have_last_older;
 	u_int restarted_count;
 	u_int nonce_uses;
@@ -2561,7 +2602,7 @@
 
 	while (TRUE) {
 		if (debug)
-			fprintf(stderr, "READ_MRU parms: %s\n", req_buf);
+			xprintf(stderr, "READ_MRU parms: %s\n", req_buf);
 
 		qres = doqueryex(CTL_OP_READ_MRU, 0, 0,
 				 strlen(req_buf), req_buf,
@@ -2573,7 +2614,7 @@
 			 * toss them from our list and try again.
 			 */
 			if (debug)
-				fprintf(stderr,
+				xprintf(stderr,
 					"no overlap between %d prior entries and server MRU list\n",
 					ri);
 			while (ri--) {
@@ -2580,7 +2621,7 @@
 				recent = HEAD_DLIST(mru_list, mlink);
 				INSIST(recent != NULL);
 				if (debug)
-					fprintf(stderr,
+					xprintf(stderr,
 						"tossing prior entry %s to resync\n",
 						sptoa(&recent->addr));
 				UNLINK_DLIST(recent, mlink);
@@ -2594,7 +2635,7 @@
 			if (NULL == HEAD_DLIST(mru_list, mlink)) {
 				restarted_count++;
 				if (restarted_count > 8) {
-					fprintf(stderr,
+					xprintf(stderr,
 						"Giving up after 8 restarts from the beginning.\n"
 						"With high-traffic NTP servers, this can occur if the\n"
 						"MRU list is limited to less than about 16 seconds' of\n"
@@ -2602,12 +2643,12 @@
 					goto cleanup_return;
 				}
 				if (debug)
-					fprintf(stderr,
-						"--->   Restarting from the beginning, retry #%u\n", 
+					xprintf(stderr,
+						"--->   Restarting from the beginning, retry #%u\n",
 						restarted_count);
 			}
 		} else if (CERR_UNKNOWNVAR == qres) {
-			fprintf(stderr,
+			xprintf(stderr,
 				"CERR_UNKNOWNVAR from ntpd but no priors given.\n");
 			goto cleanup_return;
 		} else if (CERR_BADVALUE == qres) {
@@ -2614,7 +2655,7 @@
 			if (cap_frags) {
 				cap_frags = FALSE;
 				if (debug)
-					fprintf(stderr,
+					xprintf(stderr,
 						"Reverted to row limit from fragments limit.\n");
 			} else {
 				/* ntpd has lower cap on row limit */
@@ -2621,7 +2662,7 @@
 				ntpd_row_limit--;
 				limit = min(limit, ntpd_row_limit);
 				if (debug)
-					fprintf(stderr,
+					xprintf(stderr,
 						"Row limit reduced to %d following CERR_BADVALUE.\n",
 						limit);
 			}
@@ -2634,13 +2675,13 @@
 			if (cap_frags) {
 				frags = max(2, frags / 2);
 				if (debug)
-					fprintf(stderr,
+					xprintf(stderr,
 						"Frag limit reduced to %d following incomplete response.\n",
 						frags);
 			} else {
 				limit = max(2, limit / 2);
 				if (debug)
-					fprintf(stderr,
+					xprintf(stderr,
 						"Row limit reduced to %d following incomplete response.\n",
 						limit);
 			}
@@ -2654,7 +2695,7 @@
 		 * dump similar output after the list is collected by
 		 * ntpq with a continuous sequence of indexes.  This
 		 * cheap approach has indexes resetting to zero for
-		 * each query/response, and duplicates are not 
+		 * each query/response, and duplicates are not
 		 * coalesced.
 		 */
 		if (!qres && rawmode)
@@ -2665,7 +2706,7 @@
 		while (!qres && nextvar(&rsize, &rdata, &tag, &val)) {
 			INSIST(tag && val);
 			if (debug > 1)
-				fprintf(stderr, "nextvar gave: %s = %s\n",
+				xprintf(stderr, "nextvar gave: %s = %s\n",
 					tag, val);
 			switch(tag[0]) {
 
@@ -2672,13 +2713,13 @@
 			case 'a':
 				if (!strcmp(tag, "addr.older")) {
 					if (!have_last_older) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"addr.older %s before last.older\n",
 							val);
 						goto cleanup_return;
 					}
 					if (!decodenetnum(val, &addr_older)) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"addr.older %s garbled\n",
 							val);
 						goto cleanup_return;
@@ -2692,7 +2733,7 @@
 						      &recent->addr))
 							break;
 					if (NULL == recent) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"addr.older %s not in hash table\n",
 							val);
 						goto cleanup_return;
@@ -2699,7 +2740,7 @@
 					}
 					if (!L_ISEQU(&last_older,
 						     &recent->last)) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"last.older %08x.%08x mismatches %08x.%08x expected.\n",
 							last_older.l_ui,
 							last_older.l_uf,
@@ -2720,7 +2761,7 @@
 					if ('0' != val[0] ||
 					    'x' != val[1] ||
 					    !hextolfp(val + 2, &last_older)) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"last.older %s garbled\n",
 							val);
 						goto cleanup_return;
@@ -2728,13 +2769,13 @@
 					have_last_older = TRUE;
 				} else if (!strcmp(tag, "last.newest")) {
 					if (0 != got) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"last.newest %s before complete row, got = 0x%x\n",
 							val, (u_int)got);
 						goto cleanup_return;
 					}
 					if (!have_now) {
-						fprintf(stderr,
+						xprintf(stderr,
 							"last.newest %s before now=\n",
 							val);
 						goto cleanup_return;
@@ -2746,7 +2787,7 @@
 						    !hextolfp(val + 2, &newest) ||
 						    !L_ISEQU(&newest,
 							     &head->last)) {
-							fprintf(stderr,
+							xprintf(stderr,
 								"last.newest %s mismatches %08x.%08x",
 								val,
 								head->last.l_ui,
@@ -2822,7 +2863,7 @@
 				break;
 
 			default:
-			nomatch:	
+			nomatch:
 				/* empty stmt */ ;
 				/* ignore unknown tags */
 			}
@@ -2838,7 +2879,7 @@
 			fflush(stdout);
 		}
 		if (list_complete || mrulist_interrupted) {
-			fprintf(stderr,
+			xprintf(stderr,
 				"\rRetrieved %u unique MRU entries and %u updates.\n",
 				mru_count, mru_dupes);
 			fflush(stderr);
@@ -2846,7 +2887,7 @@
 		}
 		if (time(NULL) >= next_report) {
 			next_report += MRU_REPORT_SECS;
-			fprintf(stderr, "\r%u (%u updates) ", mru_count,
+			xprintf(stderr, "\r%u (%u updates) ", mru_count,
 				mru_dupes);
 			fflush(stderr);
 		}
@@ -2870,7 +2911,7 @@
 		 * If there were no errors, increase the number of rows
 		 * to a maximum of 3 * MAXFRAGS (the most packets ntpq
 		 * can handle in one response), on the assumption that
-		 * no less than 3 rows fit in each packet, capped at 
+		 * no less than 3 rows fit in each packet, capped at
 		 * our best guess at the server's row limit.
 		 */
 		if (!qres) {
@@ -3007,7 +3048,7 @@
 
 	pm1 = *ppm1;
 	pm2 = *ppm2;
-	
+
 	return (pm1->count < pm2->count)
 		   ? -1
 		   : ((pm1->count == pm2->count)
@@ -3102,7 +3143,7 @@
  * timestamps.  mrulist shows 0 avgint, monlist shows a value identical
  * to lstint.
  */
-static void 
+static void
 mrulist(
 	struct parse *	pcmd,
 	FILE *		fp
@@ -3134,7 +3175,7 @@
 
 	mrulist_interrupted = FALSE;
 	push_ctrl_c_handler(&mrulist_ctrl_c_hook);
-	fprintf(stderr,
+	xprintf(stderr,
 		"Ctrl-C will stop MRU retrieval and display partial results.\n");
 	fflush(stderr);
 
@@ -3148,7 +3189,7 @@
 			if ((!strncmp(resall_eq, arg, sizeof(resall_eq)
 			    - 1) || !strncmp(resany_eq, arg,
 			    sizeof(resany_eq) - 1) || !strncmp(
-			    mincount_eq, arg, sizeof(mincount_eq) - 1) 
+			    mincount_eq, arg, sizeof(mincount_eq) - 1)
 			    || !strncmp(laddr_eq, arg, sizeof(laddr_eq)
 			    - 1) || !strncmp(maxlstint_eq, arg,
 			    sizeof(laddr_eq) - 1)) && parms + cb + 2 <=
@@ -3184,7 +3225,7 @@
 					parms += cb - 1;
 				}
 			} else
-				fprintf(stderr,
+				xprintf(stderr,
 					"ignoring unrecognized mrulist parameter: %s\n",
 					arg);
 		}
@@ -3216,7 +3257,7 @@
 	}
 
 	if (ppentry - sorted != (int)mru_count) {
-		fprintf(stderr,
+		xprintf(stderr,
 			"mru_count %u should match MRU list depth %ld.\n",
 			mru_count, (long)(ppentry - sorted));
 		free(sorted);
@@ -3243,7 +3284,7 @@
 		LFPTOD(&interval, favgint);
 		favgint /= recent->count;
 		avgint = (int)(favgint + 0.5);
-		fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5u %s\n",
+		xprintf(fp, "%6d %6d %4hx %c %d %d %6d %5u %s\n",
 			lstint, avgint, recent->rs,
 			(RES_KOD & recent->rs)
 			    ? 'K'
@@ -3256,7 +3297,7 @@
 		if (showhostnames)
 			fflush(fp);
 		if (mrulist_interrupted) {
-			fputs("\n --interrupted--\n", fp);
+			xputs("\n --interrupted--\n", fp);
 			fflush(fp);
 			break;
 		}
@@ -3263,7 +3304,7 @@
 	}
 	fflush(fp);
 	if (debug) {
-		fprintf(stderr,
+		xprintf(stderr,
 			"--- completed, freeing sorted[] pointers\n");
 		fflush(stderr);
 	}
@@ -3271,7 +3312,7 @@
 
 cleanup_return:
 	if (debug) {
-		fprintf(stderr, "... freeing MRU entries\n");
+		xprintf(stderr, "... freeing MRU entries\n");
 		fflush(stderr);
 	}
 	ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
@@ -3278,7 +3319,7 @@
 		free(recent);
 	ITER_DLIST_END()
 	if (debug) {
-		fprintf(stderr, "... freeing hash_table[]\n");
+		xprintf(stderr, "... freeing hash_table[]\n");
 		fflush(stderr);
 	}
 	free(hash_table);
@@ -3306,13 +3347,13 @@
 		return;
 	if (prow->ifnum + 1 <= ifnum) {
 		if (*pfields < IFSTATS_FIELDS)
-			fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
+			xprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
 				*pfields, IFSTATS_FIELDS);
 		*pfields = 0;
 		prow->ifnum = ifnum;
 		return;
 	}
-	fprintf(stderr,
+	xprintf(stderr,
 		"received if index %u, have %d of %d fields for index %u, aborting.\n",
 		ifnum, *pfields, IFSTATS_FIELDS, prow->ifnum);
 	exit(1);
@@ -3335,7 +3376,7 @@
 
 	(*pfields)++;
 	/* we understand 12 tags */
-	if (IFSTATS_FIELDS > *pfields)	
+	if (IFSTATS_FIELDS > *pfields)
 		return;
 	/*
 	"    interface name                                        send\n"
@@ -3342,7 +3383,7 @@
 	" #  address/broadcast     drop flag ttl mc received sent failed peers   uptime\n"
 	"==============================================================================\n");
 	 */
-	fprintf(fp,
+	xprintf(fp,
 		"%3u %-24.24s %c %4x %3u %2u %6u %6u %6u %5u %8d\n"
 		"    %s\n",
 		prow->ifnum, prow->name,
@@ -3353,7 +3394,7 @@
 		prow->received, prow->sent, prow->send_errors,
 		prow->peer_count, prow->uptime, sptoa(&prow->addr));
 	if (!SOCK_UNSPEC(&prow->bcast))
-		fprintf(fp, "    %s\n", sptoa(&prow->bcast));
+		xprintf(fp, "    %s\n", sptoa(&prow->bcast));
 	ifnum = prow->ifnum;
 	ZERO(*prow);
 	prow->ifnum = ifnum;
@@ -3363,7 +3404,7 @@
 /*
  * ifstats - ntpq -c ifstats modeled on ntpdc -c ifstats.
  */
-static void 
+static void
 ifstats(
 	struct parse *	pcmd,
 	FILE *		fp
@@ -3398,7 +3439,7 @@
 	if (qres)	/* message already displayed */
 		return;
 
-	fprintf(fp,
+	xprintf(fp,
 		"    interface name                                        send\n"
 		" #  address/broadcast     drop flag ttl mc received sent failed peers   uptime\n"
 		"==============================================================================\n");
@@ -3410,7 +3451,7 @@
 	while (nextvar(&dsize, &datap, &tag, &val)) {
 		INSIST(tag && val);
 		if (debug > 1)
-		    fprintf(stderr, "nextvar gave: %s = %s\n", tag, val);
+		    xprintf(stderr, "nextvar gave: %s = %s\n", tag, val);
 		comprende = FALSE;
 		switch(tag[0]) {
 
@@ -3498,7 +3539,7 @@
 		}
 	}
 	if (fields != IFSTATS_FIELDS)
-		fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
+		xprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
 			fields, IFSTATS_FIELDS);
 
 	fflush(fp);
@@ -3522,13 +3563,13 @@
 		return;
 	if (prow->idx + 1 == idx) {
 		if (*pfields < RESLIST_FIELDS)
-			fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+			xprintf(fp, "Warning: incomplete row with %d (of %d) fields",
 				*pfields, RESLIST_FIELDS);
 		*pfields = 0;
 		prow->idx = idx;
 		return;
 	}
-	fprintf(stderr,
+	xprintf(stderr,
 		"received reslist index %u, have %d of %d fields for index %u, aborting.\n",
 		idx, *pfields, RESLIST_FIELDS, prow->idx);
 	exit(1);
@@ -3569,7 +3610,7 @@
 	"           restrictions\n"
 	"==============================================================================\n");
 	 */
-	fprintf(fp,
+	xprintf(fp,
 		"%10lu %s\n"
 		"           %s\n",
 		prow->hits, addrmaskstr, prow->flagstr);
@@ -3582,7 +3623,7 @@
 /*
  * reslist - ntpq -c reslist modeled on ntpdc -c reslist.
  */
-static void 
+static void
 reslist(
 	struct parse *	pcmd,
 	FILE *		fp
@@ -3611,7 +3652,7 @@
 	if (qres)	/* message already displayed */
 		return;
 
-	fprintf(fp,
+	xprintf(fp,
 		"   hits    addr/prefix or addr mask\n"
 		"           restrictions\n"
 		"==============================================================================\n");
@@ -3623,7 +3664,7 @@
 	while (nextvar(&dsize, &datap, &tag, &val)) {
 		INSIST(tag && val);
 		if (debug > 1)
-			fprintf(stderr, "nextvar gave: %s = %s\n", tag, val);
+			xprintf(stderr, "nextvar gave: %s = %s\n", tag, val);
 		comprende = FALSE;
 		switch(tag[0]) {
 
@@ -3670,7 +3711,7 @@
 		}
 	}
 	if (fields != RESLIST_FIELDS)
-		fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+		xprintf(fp, "Warning: incomplete row with %d (of %d) fields",
 			fields, RESLIST_FIELDS);
 
 	fflush(fp);
@@ -3680,7 +3721,7 @@
 /*
  * collect_display_vdc
  */
-static void 
+static void
 collect_display_vdc(
 	associd_t	as,
 	vdc *		table,
@@ -3705,6 +3746,7 @@
 	int match;
 	u_long ul;
 	int vtype;
+	sockaddr_u sau;
 
 	ZERO(vl);
 	for (pvdc = table; pvdc->tag != NULL; pvdc++) {
@@ -3765,6 +3807,7 @@
 				}
 			}
 			/* fallthru */
+		case NTP_REFID:	/* fallthru */
 		case NTP_MODE:	/* fallthru */
 		case NTP_2BIT:
 			pvdc->v.str = estrdup(val);
@@ -3776,7 +3819,7 @@
 
 		case NTP_ADP:
 			if (!decodenetnum(val, &pvdc->v.sau))
-				fprintf(stderr, "malformed %s=%s\n",
+				xprintf(stderr, "malformed %s=%s\n",
 					pvdc->tag, val);
 			break;
 
@@ -3783,12 +3826,12 @@
 		case NTP_ADD:
 			if (0 == n) {	/* adr */
 				if (!decodenetnum(val, &pvdc->v.sau))
-					fprintf(stderr,
+					xprintf(stderr,
 						"malformed %s=%s\n",
 						pvdc->tag, val);
 			} else {	/* port */
 				if (atouint(val, &ul))
-					SET_PORT(&pvdc->v.sau, 
+					SET_PORT(&pvdc->v.sau,
 						 (u_short)ul);
 			}
 			break;
@@ -3800,7 +3843,7 @@
 		vtype = (0 == as)
 			    ? TYPE_SYS
 			    : TYPE_PEER;
-		fprintf(fp, "associd=%u status=%04x %s,\n", as, rstatus,
+		xprintf(fp, "associd=%u status=%04x %s,\n", as, rstatus,
 			statustoa(vtype, rstatus));
 	}
 
@@ -3809,7 +3852,7 @@
 
 		case NTP_STR:
 			if (pvdc->v.str != NULL) {
-				fprintf(fp, "%s  %s\n", pvdc->display,
+				xprintf(fp, "%s  %s\n", pvdc->display,
 					pvdc->v.str);
 				free(pvdc->v.str);
 				pvdc->v.str = NULL;
@@ -3818,29 +3861,48 @@
 
 		case NTP_ADD:	/* fallthru */
 		case NTP_ADP:
-			fprintf(fp, "%s  %s\n", pvdc->display,
+			xprintf(fp, "%s  %s\n", pvdc->display,
 				nntohostp(&pvdc->v.sau));
 			break;
 
 		case NTP_LFP:
-			fprintf(fp, "%s  %s\n", pvdc->display,
+			xprintf(fp, "%s  %s\n", pvdc->display,
 				prettydate(&pvdc->v.lfp));
 			break;
 
 		case NTP_MODE:
 			atouint(pvdc->v.str, &ul);
-			fprintf(fp, "%s  %s\n", pvdc->display,
+			xprintf(fp, "%s  %s\n", pvdc->display,
 				modetoa((int)ul));
+			free(pvdc->v.str);
+			pvdc->v.str = NULL;
 			break;
 
 		case NTP_2BIT:
 			atouint(pvdc->v.str, &ul);
-			fprintf(fp, "%s  %s\n", pvdc->display,
+			xprintf(fp, "%s  %s\n", pvdc->display,
 				leapbits[ul & 0x3]);
+			free(pvdc->v.str);
+			pvdc->v.str = NULL;
 			break;
 
+		case NTP_REFID:
+			if (!decodenetnum(pvdc->v.str, &sau)) {
+				fprintf(fp, "%s  %s\n", pvdc->display,    /* Text fmt */
+					pvdc->v.str);
+			} else if (drefid == REFID_IPV4) {
+				fprintf(fp, "%s  %s\n", pvdc->display,    /* IPv4 fmt */
+					stoa(&sau));
+			} else {
+				fprintf (fp, "%s  0x%08x\n", pvdc->display,	   /* Hex / hash */
+					 ntohl(addr2refid(&sau)));
+			}
+			free(pvdc->v.str);
+			pvdc->v.str = NULL;
+			break;
+
 		default:
-			fprintf(stderr, "unexpected vdc type %d for %s\n",
+			xprintf(stderr, "unexpected vdc type %d for %s\n",
 				pvdc->type, pvdc->tag);
 			break;
 		}
@@ -3898,7 +3960,7 @@
 	VDC_INIT("precision",		"log2 precision:   ", NTP_STR),
 	VDC_INIT("rootdelay",		"root delay:       ", NTP_STR),
 	VDC_INIT("rootdisp",		"root dispersion:  ", NTP_STR),
-	VDC_INIT("refid",		"reference ID:     ", NTP_STR),
+	VDC_INIT("refid",		"reference ID:     ", NTP_REFID),
 	VDC_INIT("reftime",		"reference time:   ", NTP_LFP),
 	VDC_INIT("sys_jitter",		"system jitter:    ", NTP_STR),
 	VDC_INIT("clk_jitter",		"clock jitter:     ", NTP_STR),
--- contrib/ntp/ntpq/ntpq.1ntpqman.orig
+++ contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpq 1ntpqman "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpq 1ntpqman "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:02 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:22 PM by AutoGen 5.18.5
 .\" From the definitions ntpq-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -1579,7 +1579,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpq/ntpq.1ntpqmdoc.orig
+++ contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPQ 1ntpqmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:59 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:19 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -1046,7 +1046,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpq/ntpq.c.orig
+++ contrib/ntp/ntpq/ntpq.c
@@ -122,10 +122,12 @@
 #define	NA	2	/* network address */
 #define	LP	3	/* leap (print in binary) */
 #define	RF	4	/* refid (sometimes string, sometimes not) */
-#define	AR	5	/* array of times */
+#define	AU	5	/* array of unsigned times */
 #define FX	6	/* test flags */
 #define TS	7	/* l_fp timestamp in hex */
 #define	OC	8	/* integer, print in octal */
+#define	AS	9	/* array of signed times */
+#define	SN	10	/* signed number: must display +/- sign */
 #define	EOV	255	/* end of table */
 
 /*
@@ -146,10 +148,12 @@
 	{ "srcadr",		HA },
 	{ "peeradr",		HA },	/* compat with others */
 	{ "dstadr",		NA },
-	{ "filtdelay",		AR },
-	{ "filtoffset",		AR },
-	{ "filtdisp",		AR },
-	{ "filterror",		AR },	/* compat with others */
+	{ "filtdelay",		AU },
+	{ "filtoffset",		AS },
+	{ "filtdisp",		AU },
+	{ "filterror",		AU },	/* compat with others */
+	{ "offset",		SN },
+	{ "frequency",		SN }
 };
 
 
@@ -225,7 +229,7 @@
 static	void	startoutput	(void);
 static	void	output		(FILE *, const char *, const char *);
 static	void	endoutput	(FILE *);
-static	void	outputarr	(FILE *, char *, int, l_fp *);
+static	void	outputarr	(FILE *, char *, int, l_fp *, int);
 static	int	assoccmp	(const void *, const void *);
 	u_short	varfmt		(const char *);
 	void	ntpq_custom_opt_handler(tOptions *, tOptDesc *);
@@ -3493,7 +3497,8 @@
 	FILE *fp,
 	char *name,
 	int narr,
-	l_fp *lfp
+	l_fp *lfp,
+	int issigned
 	)
 {
 	char *bp;
@@ -3512,7 +3517,7 @@
 	for (i = narr; i > 0; i--) {
 		if (i != (size_t)narr)
 			*bp++ = ' ';
-		cp = lfptoms(lfp, 2);
+		cp = (issigned ? lfptoms(lfp, 2) : ulfptoms(lfp, 2));
 		len = strlen(cp);
 		if (len > 7) {
 			cp[7] = '\0';
@@ -3657,11 +3662,31 @@
 			if (!value) {
 				output_raw = '?';
 			} else if (decodenetnum(value, &hval)) {
-				if (ISREFCLOCKADR(&hval))
-					output(fp, name,
-					       refnumtoa(&hval));
-				else
-					output(fp, name, stoa(&hval));
+				if (datatype == TYPE_CLOCK && IS_IPV4(&hval)) {
+					/*
+					 * Workaround to override numeric refid formats 
+					 * for refclocks received from faulty nptd servers 
+					 * and output them as text.
+					 */
+					int i;
+					unsigned char *str = (unsigned char *)&(hval.sa4).sin_addr;
+					char refid_buf[5];
+					for (i=0; i<4 && str[i]; i++)
+						refid_buf[i] = (isprint(str[i]) ? str[i] : '?');
+					refid_buf[i] = 0; /* Null terminator */
+					output(fp, name, refid_buf);
+				} else if (ISREFCLOCKADR(&hval)) {
+					output(fp, name, refnumtoa(&hval));
+				} else {
+					if (drefid == REFID_IPV4) {
+						output(fp, name, stoa(&hval));
+					} else {
+						char refid_buf[12];
+						snprintf (refid_buf, sizeof(refid_buf), 
+							  "0x%08x", ntohl(addr2refid(&hval)));
+						output(fp, name, refid_buf);
+					}
+				}
 			} else if (strlen(value) <= 4) {
 				output(fp, name, value);
 			} else {
@@ -3693,11 +3718,12 @@
 			}
 			break;
 
-		case AR:
+		case AU:
+		case AS:
 			if (!value || !decodearr(value, &narr, lfparr, 8))
 				output_raw = '?';
 			else
-				outputarr(fp, name, narr, lfparr);
+				outputarr(fp, name, narr, lfparr, (fmt==AS));
 			break;
 
 		case FX:
@@ -3707,6 +3733,17 @@
 				output(fp, name, tstflags(uval));
 			break;
 
+		case SN:
+			if (!value)
+				output_raw = '?';
+			else if (isdigit(*value)) {	/* number without sign */
+				bv[0] = '+';
+				atoascii (value, MAXVALLEN, bv+1, sizeof(bv)-1);
+				output(fp, name, bv);
+			} else
+				output_raw = '*';		/* output as-is */
+			break;
+
 		default:
 			fprintf(stderr, "Internal error in cookedprint, %s=%s, fmt %d\n",
 				name, value, fmt);
--- contrib/ntp/ntpq/ntpq.h.orig
+++ contrib/ntp/ntpq/ntpq.h
@@ -64,6 +64,7 @@
 #define NTP_LFP		0x7	/* NTP timestamp */
 #define NTP_MODE	0x8	/* peer mode */
 #define NTP_2BIT	0x9	/* leap bits */
+#define NTP_REFID	0xA	/* RefID */
 
 /*
  * Arguments are returned in a union
--- contrib/ntp/ntpq/ntpq.html.orig
+++ contrib/ntp/ntpq/ntpq.html
@@ -73,7 +73,7 @@
 and determine the performance of
 <code>ntpd</code>, the NTP daemon.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntpq</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntpq</code>.
 </p>
 <table class="menu" border="0" cellspacing="0">
 <tr><td align="left" valign="top">&bull; <a href="#ntpq-Description" accesskey="1">ntpq Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
@@ -1293,7 +1293,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p12
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p13
 Usage:  ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 name resolution
--- contrib/ntp/ntpq/ntpq.man.in.orig
+++ contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpq @NTPQ_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpq @NTPQ_MS@ "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:02 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:22 PM by AutoGen 5.18.5
 .\" From the definitions ntpq-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -1579,7 +1579,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpq/ntpq.mdoc.in.orig
+++ contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPQ @NTPQ_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:56:59 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:19 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -1046,7 +1046,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi.orig
+++ contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntpsnmpd.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:07 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:26 PM by AutoGen 5.18.5
 # From the definitions    ntpsnmpd-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
--- contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:57:03 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:23 PM by AutoGen 5.18.5
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpsnmpd program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -61,8 +61,8 @@
  *  static const strings for ntpsnmpd options
  */
 static char const ntpsnmpd_opt_strs[1613] =
-/*     0 */ "ntpsnmpd 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "ntpsnmpd 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -101,7 +101,7 @@
 /*  1415 */ "no-load-opts\0"
 /*  1428 */ "no\0"
 /*  1431 */ "NTPSNMPD\0"
-/*  1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13\n"
+/*  1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
 /*  1544 */ "$HOME\0"
 /*  1550 */ ".\0"
@@ -108,7 +108,7 @@
 /*  1552 */ ".ntprc\0"
 /*  1559 */ "http://bugs.ntp.org, bugs@ntp.org\0"
 /*  1593 */ "\n\0"
-/*  1595 */ "ntpsnmpd 4.2.8p13";
+/*  1595 */ "ntpsnmpd 4.2.8p14";
 
 /**
  *  nofork option description:
@@ -554,8 +554,8 @@
      translate option names.
    */
   /* referenced via ntpsnmpdOptions.pzCopyright */
-  puts(_("ntpsnmpd 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("ntpsnmpd 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -599,7 +599,7 @@
   puts(_("load options from a config file"));
 
   /* referenced via ntpsnmpdOptions.pzUsageTitle */
-  puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13\n\
+  puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
 
   /* referenced via ntpsnmpdOptions.pzExplain */
@@ -606,7 +606,7 @@
   puts(_("\n"));
 
   /* referenced via ntpsnmpdOptions.pzFullVersion */
-  puts(_("ntpsnmpd 4.2.8p13"));
+  puts(_("ntpsnmpd 4.2.8p14"));
 
   /* referenced via ntpsnmpdOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:57:03 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:23 PM by AutoGen 5.18.5
  *  From the definitions    ntpsnmpd-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntpsnmpd program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -76,9 +76,9 @@
 /** count of all options for ntpsnmpd */
 #define OPTION_CT    8
 /** ntpsnmpd version */
-#define NTPSNMPD_VERSION       "4.2.8p13"
+#define NTPSNMPD_VERSION       "4.2.8p14"
 /** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION  "ntpsnmpd 4.2.8p13"
+#define NTPSNMPD_FULL_VERSION  "ntpsnmpd 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:27 PM by AutoGen 5.18.5
 .\" From the definitions ntpsnmpd-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -138,7 +138,7 @@
 .NOP  "Heiko Gerstung" 
 .br
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:05 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:24 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpsnmpd-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -110,7 +110,7 @@
 .Sh AUTHORS
 .An "Heiko Gerstung"
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpsnmpd/ntpsnmpd.html.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd.html
@@ -71,7 +71,7 @@
 <p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
 operations and determine performance.  It uses the standard NTP mode 6 control
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntpsnmpd</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntpsnmpd</code>.
 </p>
 <table class="menu" border="0" cellspacing="0">
 <tr><td align="left" valign="top">&bull; <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
--- contrib/ntp/ntpsnmpd/ntpsnmpd.man.in.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:27 PM by AutoGen 5.18.5
 .\" From the definitions ntpsnmpd-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -138,7 +138,7 @@
 .NOP  "Heiko Gerstung" 
 .br
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in.orig
+++ contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:05 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:24 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpsnmpd-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -110,7 +110,7 @@
 .Sh AUTHORS
 .An "Heiko Gerstung"
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/packageinfo.sh.orig
+++ contrib/ntp/packageinfo.sh
@@ -83,7 +83,7 @@
 # - Numeric values increment
 # - empty 'increments' to 1
 # - NEW 'increments' to empty
-point=13
+point=14
 
 ### betapoint is normally modified by script.
 # ntp-stable Beta number (betapoint)
--- contrib/ntp/parseutil/dcfd.c.orig
+++ contrib/ntp/parseutil/dcfd.c
@@ -121,9 +121,9 @@
 #define LPRINTF if (interactive && loop_filter_debug) printf
 
 #ifdef DEBUG
-#define dprintf(_x_) LPRINTF _x_
+#define DPRINTF(_x_) LPRINTF _x_
 #else
-#define dprintf(_x_)
+#define DPRINTF(_x_)
 #endif
 
 #ifdef DECL_ERRNO
@@ -595,7 +595,7 @@
 			/*
 			 * invalid character (no consecutive bit sequence)
 			 */
-			dprintf(("parse: cvt_rawdcf: character check for 0x%x@%ld FAILED\n",
+			DPRINTF(("parse: cvt_rawdcf: character check for 0x%x@%ld FAILED\n",
 				 (u_int)*s, (long)(s - buffer)));
 			*s = (unsigned char)~0;
 			rtc = CVT_FAIL|CVT_BADFMT;
@@ -616,7 +616,7 @@
 		cutoff = 4;	/* doesn't really matter - it'll fail anyway, but gives error output */
 	}
 
-	dprintf(("parse: cvt_rawdcf: average bit count: %d\n", cutoff));
+	DPRINTF(("parse: cvt_rawdcf: average bit count: %d\n", cutoff));
 
 	lowmax = 0;  /* weighted sum */
 	highmax = 0; /* bitcount */
@@ -624,14 +624,14 @@
 	/*
 	 * collect weighted sum of lower bits (left of initial guess)
 	 */
-	dprintf(("parse: cvt_rawdcf: histogram:"));
+	DPRINTF(("parse: cvt_rawdcf: histogram:"));
 	for (i = 0; i <= cutoff; i++)
 	{
 		lowmax  += histbuf[i] * i;
 		highmax += histbuf[i];
-		dprintf((" %d", histbuf[i]));
+		DPRINTF((" %d", histbuf[i]));
 	}
-	dprintf((" <M>"));
+	DPRINTF((" <M>"));
 
 	/*
 	 * round up
@@ -662,9 +662,9 @@
 	{
 		highmax+=histbuf[i] * i;
 		cutoff +=histbuf[i];
-		dprintf((" %d", histbuf[i]));
+		DPRINTF((" %d", histbuf[i]));
 	}
-	dprintf(("\n"));
+	DPRINTF(("\n"));
 
 	/*
 	 * determine upper maximum (weighted sum / bit count)
@@ -716,7 +716,7 @@
 	 */
 	cutoff = (cutoff + span) / 2;
 
-	dprintf(("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff));
+	DPRINTF(("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff));
 
 	/*
 	 * convert the bit counts to symbolic 1/0 information for data conversion
--- contrib/ntp/scripts/build/mkver.in.orig
+++ contrib/ntp/scripts/build/mkver.in
@@ -15,7 +15,12 @@
  *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
 esac
 
-ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
+if [ -n "$SOURCE_DATE_EPOCH" ]; then
+   ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" ||
+   ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`"
+else
+   ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
+fi
 
 if [ ! -f .version ]; then
   echo 0 > .version
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (calc_tickadj-opts)
 #
-# It has been AutoGen-ed  August 31, 2014 at 04:52:46 AM by AutoGen 5.18.4
+# It has been AutoGen-ed  April  5, 2019 at 01:12:39 AM by AutoGen 5.18.5
 # From the definitions    calc_tickadj-opts.def
 # and the template file   perlopt
 
@@ -39,7 +39,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p13
 USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
 
     -d, --drift-file=str         Ntp drift file to use
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:23 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:52 PM by AutoGen 5.18.5
 .\" From the definitions calc_tickadj-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (calc_tickadj-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:24 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:53 PM by AutoGen 5.18.5
 .\"  From the definitions    calc_tickadj-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj.html.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
@@ -58,7 +58,7 @@
 <h1 class="top">calc_tickadj User&rsquo;s Manual</h1>
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>calc_tickadj</code> program.
-This document applies to version 4.2.8p13 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p14 of <code>calc_tickadj</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -149,7 +149,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">calc_tickadj - Calculates &quot;optimal&quot; value for tick given ntp drift file. - Ver. 4.2.7p467
+<pre class="example">calc_tickadj - Calculates &quot;optimal&quot; value for tick given ntp drift file. - Ver. 4.2.8p13
 USAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... 
 
     -d, --drift-file=str         Ntp drift file to use
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:23 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:52 PM by AutoGen 5.18.5
 .\" From the definitions calc_tickadj-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in.orig
+++ contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (calc_tickadj-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:24 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:53 PM by AutoGen 5.18.5
 .\"  From the definitions    calc_tickadj-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi.orig
+++ contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-calc_tickadj.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:25 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:54 PM by AutoGen 5.18.5
 # From the definitions    calc_tickadj-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -63,7 +63,7 @@
 
 @exampleindent 0
 @example
-calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p13
 USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
 
     -d, --drift-file=str         Ntp drift file to use
--- contrib/ntp/scripts/invoke-plot_summary.texi.orig
+++ contrib/ntp/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-plot_summary.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:11 PM by AutoGen 5.18.5
 # From the definitions    plot_summary-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -41,7 +41,7 @@
 
 @exampleindent 0
 @example
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p13
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p14
 USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
 
         --directory=str          Where the summary files are
--- contrib/ntp/scripts/invoke-summary.texi.orig
+++ contrib/ntp/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-summary.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:29 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:15 PM by AutoGen 5.18.5
 # From the definitions    summary-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -42,7 +42,7 @@
 
 @exampleindent 0
 @example
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p13
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p14
 USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
 
         --directory=str          Directory containing stat files
--- contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi.orig
+++ contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntp-wait.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:28 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:57 PM by AutoGen 5.18.5
 # From the definitions    ntp-wait-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -61,7 +61,7 @@
 
 @exampleindent 0
 @example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p13
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p14
 USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... 
 
     -n, --tries=num              Number of times to check ntpd
--- contrib/ntp/scripts/ntp-wait/ntp-wait-opts.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (ntp-wait-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:27 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:56 PM by AutoGen 5.18.5
 # From the definitions    ntp-wait-opts.def
 # and the template file   perlopt
 
@@ -40,7 +40,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p13
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p14
 USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
 
     -n, --tries=num              Number of times to check ntpd
--- contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp-wait 1ntp-waitman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntp-wait 1ntp-waitman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:58 PM by AutoGen 5.18.5
 .\" From the definitions ntp-wait-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_WAIT 1ntp-waitmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-wait-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:27 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:56 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp-wait-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/ntp-wait/ntp-wait.html.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait.html
@@ -68,7 +68,7 @@
 and only then start any applicaitons (like database servers) that require
 accurate and stable time.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntp-wait</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntp-wait</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -159,7 +159,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p13
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p14
 USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... 
 
     -n, --tries=num              Number of times to check ntpd
--- contrib/ntp/scripts/ntp-wait/ntp-wait.man.in.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:58 PM by AutoGen 5.18.5
 .\" From the definitions ntp-wait-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in.orig
+++ contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-wait-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:27 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:56 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp-wait-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi.orig
+++ contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntpsweep.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:31 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:00 PM by AutoGen 5.18.5
 # From the definitions    ntpsweep-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -45,7 +45,7 @@
 
 @exampleindent 0
 @example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p13
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p14
 USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
 
     -l, --host-list=str          Host to execute actions on
--- contrib/ntp/scripts/ntpsweep/ntpsweep-opts.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (ntpsweep-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:31 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:59 PM by AutoGen 5.18.5
 # From the definitions    ntpsweep-opts.def
 # and the template file   perlopt
 
@@ -43,7 +43,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p13
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p14
 USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
 
     -l, --host-list=str          Host to execute actions on
--- contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpsweep 1ntpsweepman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntpsweep 1ntpsweepman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:33 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:02 PM by AutoGen 5.18.5
 .\" From the definitions ntpsweep-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPSWEEP 1ntpsweepmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsweep-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:32 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:01 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpsweep-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/ntpsweep/ntpsweep.html.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep.html
@@ -59,7 +59,7 @@
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>ntpsweep</code> program.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntpsweep</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntpsweep</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -134,7 +134,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p13
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p14
 USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
 
     -l, --host-list=str          Host to execute actions on
--- contrib/ntp/scripts/ntpsweep/ntpsweep.man.in.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntpsweep 1ntpsweepman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntpsweep 1ntpsweepman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:33 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:02 PM by AutoGen 5.18.5
 .\" From the definitions ntpsweep-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in.orig
+++ contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPSWEEP 1ntpsweepmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntpsweep-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:32 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:01 PM by AutoGen 5.18.5
 .\"  From the definitions    ntpsweep-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi.orig
+++ contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntptrace.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:36 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:05 PM by AutoGen 5.18.5
 # From the definitions    ntptrace-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -62,7 +62,7 @@
 
 @exampleindent 0
 @example
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p13
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p14
 USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
 
     -n, --numeric                Print IP addresses instead of hostnames
--- contrib/ntp/scripts/ntptrace/ntptrace-opts.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (ntptrace-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:35 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:03 PM by AutoGen 5.18.5
 # From the definitions    ntptrace-opts.def
 # and the template file   perlopt
 
@@ -40,7 +40,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p13
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p14
 USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
 
     -n, --numeric                Print IP addresses instead of hostnames
--- contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntptrace 1ntptraceman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntptrace 1ntptraceman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:37 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:06 PM by AutoGen 5.18.5
 .\" From the definitions ntptrace-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPTRACE 1ntptracemdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntptrace-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:35 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:03 PM by AutoGen 5.18.5
 .\"  From the definitions    ntptrace-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/ntptrace/ntptrace.html.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace.html
@@ -59,7 +59,7 @@
 <h1 class="top">Simple Network Time Protocol User Manual</h1>
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>ntptrace</code> program.
-This document applies to version 4.2.8p13 of <code>ntptrace</code>.
+This document applies to version 4.2.8p14 of <code>ntptrace</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -150,7 +150,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p13
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p14
 USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
 
     -n, --numeric                Print IP addresses instead of hostnames
--- contrib/ntp/scripts/ntptrace/ntptrace.man.in.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:37 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:06 PM by AutoGen 5.18.5
 .\" From the definitions ntptrace-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in.orig
+++ contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTPTRACE @NTPTRACE_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntptrace-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:35 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:03 PM by AutoGen 5.18.5
 .\"  From the definitions    ntptrace-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/plot_summary-opts.orig
+++ contrib/ntp/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (plot_summary-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:11 PM by AutoGen 5.18.5
 # From the definitions    plot_summary-opts.def
 # and the template file   perlopt
 
@@ -46,7 +46,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p13
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p14
 USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
 
         --directory=str          Where the summary files are
--- contrib/ntp/scripts/plot_summary.1plot_summaryman.orig
+++ contrib/ntp/scripts/plot_summary.1plot_summaryman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH plot_summary 1plot_summaryman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH plot_summary 1plot_summaryman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:13 PM by AutoGen 5.18.5
 .\" From the definitions plot_summary-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/plot_summary.1plot_summarymdoc.orig
+++ contrib/ntp/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (plot_summary-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 05:04:27 PM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:14 PM by AutoGen 5.18.5
 .\"  From the definitions    plot_summary-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/plot_summary.html.orig
+++ contrib/ntp/scripts/plot_summary.html
@@ -59,7 +59,7 @@
 <h1 class="top">Plot_summary User Manual</h1>
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>plot_summary</code> program.
-This document applies to version 4.2.8p13 of <code>plot_summary</code>.
+This document applies to version 4.2.8p14 of <code>plot_summary</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -131,7 +131,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p13
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p14
 USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... 
 
         --directory=str          Where the summary files are
--- contrib/ntp/scripts/plot_summary.man.in.orig
+++ contrib/ntp/scripts/plot_summary.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH plot_summary 1plot_summaryman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH plot_summary 1plot_summaryman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:13 PM by AutoGen 5.18.5
 .\" From the definitions plot_summary-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/plot_summary.mdoc.in.orig
+++ contrib/ntp/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (plot_summary-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 05:04:27 PM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:14 PM by AutoGen 5.18.5
 .\"  From the definitions    plot_summary-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/summary-opts.orig
+++ contrib/ntp/scripts/summary-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (summary-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:11 PM by AutoGen 5.18.5
 # From the definitions    summary-opts.def
 # and the template file   perlopt
 
@@ -44,7 +44,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p13
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p14
 USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
 
         --directory=str          Directory containing stat files
--- contrib/ntp/scripts/summary.1summaryman.orig
+++ contrib/ntp/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH summary 1summaryman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH summary 1summaryman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:16 PM by AutoGen 5.18.5
 .\" From the definitions summary-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/summary.1summarymdoc.orig
+++ contrib/ntp/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt SUMMARY 1summarymdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (summary-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 05:04:31 PM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:17 PM by AutoGen 5.18.5
 .\"  From the definitions    summary-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/summary.html.orig
+++ contrib/ntp/scripts/summary.html
@@ -59,7 +59,7 @@
 <h1 class="top">Summary User Manual</h1>
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>summary</code> program.
-This document applies to version 4.2.8p13 of <code>summary</code>.
+This document applies to version 4.2.8p14 of <code>summary</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
@@ -131,7 +131,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p13
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p14
 USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... 
 
         --directory=str          Directory containing stat files
--- contrib/ntp/scripts/summary.man.in.orig
+++ contrib/ntp/scripts/summary.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH summary 1summaryman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH summary 1summaryman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:16 PM by AutoGen 5.18.5
 .\" From the definitions summary-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/summary.mdoc.in.orig
+++ contrib/ntp/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt SUMMARY 1summarymdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (summary-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 05:04:31 PM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:17 PM by AutoGen 5.18.5
 .\"  From the definitions    summary-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/update-leap/invoke-update-leap.texi.orig
+++ contrib/ntp/scripts/update-leap/invoke-update-leap.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-update-leap.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:22 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:09 PM by AutoGen 5.18.5
 # From the definitions    update-leap-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
--- contrib/ntp/scripts/update-leap/update-leap-opts.orig
+++ contrib/ntp/scripts/update-leap/update-leap-opts
@@ -1,6 +1,6 @@
 # EDIT THIS FILE WITH CAUTION  (update-leap-opts)
 #
-# It has been AutoGen-ed  February 20, 2019 at 05:04:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:42:11 PM by AutoGen 5.18.5
 # From the definitions    update-leap-opts.def
 # and the template file   perlopt
 
@@ -46,7 +46,7 @@
         'help|?', 'more-help'));
 
     $usage = <<'USAGE';
-update-leap - leap-seconds file manager/updater - Ver. 4.2.8p13
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p14
 USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
 
     -s, --source-url=str         The URL of the master copy of the leapseconds file
--- contrib/ntp/scripts/update-leap/update-leap.1update-leapman.orig
+++ contrib/ntp/scripts/update-leap/update-leap.1update-leapman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH update-leap 1update-leapman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH update-leap 1update-leapman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:24 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:10 PM by AutoGen 5.18.5
 .\" From the definitions update-leap-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc.orig
+++ contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt UPDATE_LEAP 1update-leapmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:38 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:07 PM by AutoGen 5.18.5
 .\"  From the definitions    update-leap-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/scripts/update-leap/update-leap.html.orig
+++ contrib/ntp/scripts/update-leap/update-leap.html
@@ -59,7 +59,7 @@
 
 <p>This document describes the use of the NTP Project&rsquo;s <code>update-leap</code> program.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>update-leap</code>.
+<p>This document applies to version 4.2.8p14 of <code>update-leap</code>.
 </p>
 <a name="SEC_Overview"></a>
 <h2 class="shortcontents-heading">Short Table of Contents</h2>
--- contrib/ntp/scripts/update-leap/update-leap.man.in.orig
+++ contrib/ntp/scripts/update-leap/update-leap.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH update-leap 1update-leapman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH update-leap 1update-leapman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 05:04:24 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:42:10 PM by AutoGen 5.18.5
 .\" From the definitions update-leap-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
--- contrib/ntp/scripts/update-leap/update-leap.mdoc.in.orig
+++ contrib/ntp/scripts/update-leap/update-leap.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt UPDATE_LEAP 1update-leapmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:38 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:42:07 PM by AutoGen 5.18.5
 .\"  From the definitions    update-leap-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
--- contrib/ntp/sntp/COPYRIGHT.orig
+++ contrib/ntp/sntp/COPYRIGHT
@@ -3,7 +3,7 @@
 
    jpg "Clone me," says Dolly sheepishly.
 
-   Last update: 2-Jan-2017 11:58 UTC
+   Last update: 4-Feb-2020 23:47 UTC
      __________________________________________________________________
 
    The following copyright notice applies to all files collectively called
@@ -32,7 +32,7 @@
    Burnicki is:
 ***********************************************************************
 *                                                                     *
-* Copyright (c) Network Time Foundation 2011-2017                     *
+* Copyright (c) Network Time Foundation 2011-2020                     *
 *                                                                     *
 * All Rights Reserved                                                 *
 *                                                                     *
--- contrib/ntp/sntp/configure.orig
+++ contrib/ntp/sntp/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sntp 4.2.8p13.
+# Generated by GNU Autoconf 2.69 for sntp 4.2.8p14.
 #
 # Report bugs to <http://bugs.ntp.org./>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='sntp'
 PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.8p13'
-PACKAGE_STRING='sntp 4.2.8p13'
+PACKAGE_VERSION='4.2.8p14'
+PACKAGE_STRING='sntp 4.2.8p14'
 PACKAGE_BUGREPORT='http://bugs.ntp.org./'
 PACKAGE_URL='http://www.ntp.org./'
 
@@ -1486,7 +1486,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sntp 4.2.8p13 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1556,7 +1556,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sntp 4.2.8p13:";;
+     short | recursive ) echo "Configuration of sntp 4.2.8p14:";;
    esac
   cat <<\_ACEOF
 
@@ -1707,7 +1707,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sntp configure 4.2.8p13
+sntp configure 4.2.8p14
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2416,7 +2416,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sntp $as_me 4.2.8p13, which was
+It was created by sntp $as_me 4.2.8p14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3413,7 +3413,7 @@
 
 # Define the identity of the package.
  PACKAGE='sntp'
- VERSION='4.2.8p13'
+ VERSION='4.2.8p14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3506,6 +3506,7 @@
   fi
 fi
 
+
 # Check whether --enable-silent-rules was given.
 if test "${enable_silent_rules+set}" = set; then :
   enableval=$enable_silent_rules;
@@ -27146,7 +27147,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sntp $as_me 4.2.8p13, which was
+This file was extended by sntp $as_me 4.2.8p14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27213,7 +27214,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sntp config.status 4.2.8p13
+sntp config.status 4.2.8p14
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
--- contrib/ntp/sntp/configure.ac.orig
+++ contrib/ntp/sntp/configure.ac
@@ -1,7 +1,7 @@
 dnl SNTP subpackage configure.ac			-*- Autoconf -*-
 dnl
 m4_include([m4/version.m4])
-AC_PREREQ([2.61])
+AC_PREREQ([2.68])
 AC_INIT(
     [sntp],
     [VERSION_NUMBER],
@@ -40,12 +40,10 @@
 
 NTP_CACHEVERSION([sntp], [$sntp_configure_cache_version])
 
-AM_INIT_AUTOMAKE([1.10 foreign -Wall -Wno-gnu])
-dnl AM_SILENT_RULES req. automake 1.11.  [yes] defaults V=0
-m4_ifdef(
-    [AM_SILENT_RULES],
-    [AM_SILENT_RULES([yes])]
-)
+AM_INIT_AUTOMAKE([1.15 foreign -Wall -Wno-gnu])
+
+AM_SILENT_RULES([yes])
+
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 dnl the 'build' machine is where we run configure and compile
--- contrib/ntp/sntp/crypto.c.orig
+++ contrib/ntp/sntp/crypto.c
@@ -32,7 +32,9 @@
 	)
 {
 	u_int		len  = 0;
+#if defined(OPENSSL) && defined(ENABLE_CMAC)
 	size_t		slen = 0;
+#endif
 	int		key_type;
 	
 	INIT_SSL();
--- contrib/ntp/sntp/include/copyright.def.orig
+++ contrib/ntp/sntp/include/copyright.def
@@ -1,7 +1,7 @@
 /* -*- Mode: Text -*- */
 
 copyright = {
-    date  = "1992-2017";
+    date  = "1992-2020";
     owner = "The University of Delaware and Network Time Foundation";
     eaddr = "http://bugs.ntp.org, bugs@ntp.org";
     type  = ntp;
--- contrib/ntp/sntp/include/version.def.orig
+++ contrib/ntp/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.8p13';
+version = '4.2.8p14';
--- contrib/ntp/sntp/include/version.texi.orig
+++ contrib/ntp/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 20 February 2019
-@set EDITION 4.2.8p13
-@set VERSION 4.2.8p13
+@set UPDATED 03 March 2020
+@set EDITION 4.2.8p14
+@set VERSION 4.2.8p14
--- contrib/ntp/sntp/invoke-sntp.texi.orig
+++ contrib/ntp/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-sntp.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:55:49 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:40:02 PM by AutoGen 5.18.5
 # From the definitions    sntp-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -101,7 +101,7 @@
 
 @exampleindent 0
 @example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p13
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p14
 Usage:  sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
                 [ hostname-or-IP ...]
   Flg Arg Option-Name    Description
--- contrib/ntp/sntp/libevent/build-aux/ar-lib.orig
+++ contrib/ntp/sntp/libevent/build-aux/ar-lib
@@ -4,7 +4,7 @@
 me=ar-lib
 scriptversion=2012-03-01.08; # UTC
 
-# Copyright (C) 2010-2017 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
 # Written by Peter Rosin <peda@lysator.liu.se>.
 #
 # This program is free software; you can redistribute it and/or modify
--- contrib/ntp/sntp/libevent/build-aux/compile.orig
+++ contrib/ntp/sntp/libevent/build-aux/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -255,8 +255,7 @@
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
-  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -343,6 +342,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/build-aux/config.guess.orig
+++ contrib/ntp/sntp/libevent/build-aux/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-03-04'
+timestamp='2014-11-04'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,10 +168,8 @@
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
-	    echo unknown)`
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
@@ -178,17 +176,12 @@
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
-	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
-		;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -204,13 +197,6 @@
 		os=netbsd
 		;;
 	esac
-	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
-	    earm*)
-		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-		;;
-	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -227,7 +213,7 @@
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "${machine}-${os}${release}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -825,7 +811,12 @@
 	exit ;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
 	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
@@ -942,9 +933,6 @@
     crisv32:Linux:*:*)
 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
-    e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
     frv:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
--- contrib/ntp/sntp/libevent/build-aux/config.sub.orig
+++ contrib/ntp/sntp/libevent/build-aux/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-03-08'
+timestamp='2014-12-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -259,8 +259,8 @@
 	| bfin \
 	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| e2k | epiphany \
-	| fido | fr30 | frv | ft32 \
+	| epiphany \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
@@ -300,7 +300,7 @@
 	| ns16k | ns32k \
 	| open8 | or1k | or1knd | or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
 	| riscv32 | riscv64 \
 	| rl78 | rx \
@@ -373,7 +373,7 @@
 	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
 	| be32-* | be64-* \
@@ -381,7 +381,7 @@
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| e2k-* | elxsi-* \
+	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@@ -426,7 +426,7 @@
 	| or1k*-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | powerpcspe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
@@ -485,6 +485,12 @@
 		basic_machine=a29k-none
 		os=-bsd
 		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -512,9 +518,6 @@
 		basic_machine=i386-pc
 		os=-aros
 		;;
-        asmjs)
-		basic_machine=asmjs-unknown
-		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -1370,7 +1373,7 @@
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
--- contrib/ntp/sntp/libevent/build-aux/depcomp.orig
+++ contrib/ntp/sntp/libevent/build-aux/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -786,6 +786,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/build-aux/install-sh.orig
+++ contrib/ntp/sntp/libevent/build-aux/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -496,6 +496,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/build-aux/missing.orig
+++ contrib/ntp/sntp/libevent/build-aux/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -210,6 +210,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/build-aux/test-driver.orig
+++ contrib/ntp/sntp/libevent/build-aux/test-driver
@@ -1,9 +1,9 @@
 #! /bin/sh
 # test-driver - basic testsuite driver script.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2013-07-13.22; # UTC
 
-# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -143,6 +143,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/build-aux/ylwrap.orig
+++ contrib/ntp/sntp/libevent/build-aux/ylwrap
@@ -1,9 +1,9 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2013-01-12.17; # UTC
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
@@ -242,6 +242,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
--- contrib/ntp/sntp/libevent/test/regress.gen.c.orig
+++ contrib/ntp/sntp/libevent/test/regress.gen.c
@@ -1,5 +1,5 @@
 /*
- * Automatically generated from ../../../sntp/libevent/test/regress.rpc
+ * Automatically generated from /ntpbuild/data/snaps/ntp-stable/sntp/libevent/test/regress.rpc
  * by event_rpcgen.py/0.1.  DO NOT EDIT THIS FILE.
  */
 
--- contrib/ntp/sntp/libevent/test/regress.gen.h.orig
+++ contrib/ntp/sntp/libevent/test/regress.gen.h
@@ -1,9 +1,9 @@
 /*
- * Automatically generated from ../../../sntp/libevent/test/regress.rpc
+ * Automatically generated from /ntpbuild/data/snaps/ntp-stable/sntp/libevent/test/regress.rpc
  */
 
-#ifndef EVENT_RPCOUT__________SNTP_LIBEVENT_TEST_REGRESS_RPC_
-#define EVENT_RPCOUT__________SNTP_LIBEVENT_TEST_REGRESS_RPC_
+#ifndef EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
+#define EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
 
 #include <event2/util.h> /* for ev_uint*_t */
 #include <event2/rpc.h>
@@ -204,4 +204,4 @@
 ev_uint32_t * run_other_numbers_add(struct run *msg, const ev_uint32_t value);
 /* --- run done --- */
 
-#endif  /* EVENT_RPCOUT__________SNTP_LIBEVENT_TEST_REGRESS_RPC_ */
+#endif  /* EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_ */
--- contrib/ntp/sntp/libopts/m4/libopts.m4.orig
+++ contrib/ntp/sntp/libopts/m4/libopts.m4
@@ -216,7 +216,7 @@
   LIBREGEX_LIBS=""
   AC_MSG_CHECKING([whether libregex functions properly])
   AC_CACHE_VAL([libopts_cv_with_libregex],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 @%:@include <stdlib.h>
 @%:@include <sys/types.h>
 @%:@include REGEX_HEADER
@@ -235,7 +235,7 @@
     fputs( "error: regex -->.<-- did not match\n", stderr );
     return 1;
   }
-  return 0; }],
+  return 0; }])],
     [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
     [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE 
   ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
@@ -260,12 +260,12 @@
 AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
   AC_MSG_CHECKING([whether pathfind(3) works])
   AC_CACHE_VAL([libopts_cv_run_pathfind],[
-  AC_RUN_IFELSE([@%:@include <string.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <string.h>
 @%:@include <stdlib.h>
 int main (int argc, char ** argv) {
    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
    return (pz == 0) ? 1 : 0;
-}],
+}])],
     [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -303,7 +303,7 @@
 AC_DEFUN([LIBOPTS_RUN_REALPATH],[
   AC_MSG_CHECKING([whether we have a functional realpath(3C)])
   AC_CACHE_VAL([libopts_cv_run_realpath],[
-  AC_RUN_IFELSE([@%:@include <limits.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <limits.h>
 @%:@include <stdlib.h>
 int main (int argc, char ** argv) {
 @%:@ifndef PATH_MAX
@@ -313,7 +313,7 @@
 @%:@endif
    char *pz = realpath(argv@<:@0@:>@, zPath);
    return (pz == zPath) ? 0 : 1;
-}],
+}])],
     [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -330,7 +330,7 @@
 AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
   AC_MSG_CHECKING([whether strftime() works])
   AC_CACHE_VAL([libopts_cv_run_strftime],[
-  AC_RUN_IFELSE([@%:@include <time.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <time.h>
 @%:@include <string.h>
 char t_buf@<:@ 64 @:>@;
 int main() {
@@ -346,7 +346,7 @@
   tm.tm_yday  = 239; /* days since January 1 @<:@0, 365@:>@ */
   tm.tm_isdst =  1;  /* flag for daylight savings time */
   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
-  return (strcmp( t_buf, z ) != 0); }],
+  return (strcmp( t_buf, z ) != 0); }])],
     [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -363,10 +363,10 @@
 AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
   AC_MSG_CHECKING([whether fopen accepts "b" mode])
   AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char ** argv) {
 FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
     [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -386,10 +386,10 @@
 AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
   AC_MSG_CHECKING([whether fopen accepts "t" mode])
   AC_CACHE_VAL([libopts_cv_run_fopen_text],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char ** argv) {
 FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
     [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
--- contrib/ntp/sntp/m4/ntp_problemtests.m4.orig
+++ contrib/ntp/sntp/m4/ntp_problemtests.m4
@@ -33,6 +33,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_restrict="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_restrict="no" ;;
+  * ) ;;
+esac
 AC_MSG_RESULT([$ntp_test_ntp_restrict])
 AM_CONDITIONAL([BUILD_TEST_NTP_RESTRICT], [test x$ntp_test_ntp_restrict = xyes])
 
@@ -43,6 +47,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_scanner="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_scanner="no" ;;
+  * ) ;;
+esac
 AC_MSG_RESULT([$ntp_test_ntp_scanner])
 AM_CONDITIONAL([BUILD_TEST_NTP_SCANNER], [test x$ntp_test_ntp_scanner = xyes])
 
@@ -53,6 +61,10 @@
  no:0:*-*-solaris*) ;;
  *) ntp_test_ntp_signd="yes" ;;
 esac
+case "$ntp_cv_gc_sections_runs" in
+  no) ntp_test_ntp_signd="no" ;;
+  * ) ;;
+esac
 AC_MSG_RESULT([$ntp_test_ntp_signd])
 AM_CONDITIONAL([BUILD_TEST_NTP_SIGND], [test x$ntp_test_ntp_signd = xyes])
 
--- contrib/ntp/sntp/m4/version.m4.orig
+++ contrib/ntp/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.8p13])
+m4_define([VERSION_NUMBER],[4.2.8p14])
--- contrib/ntp/sntp/main.c.orig
+++ contrib/ntp/sntp/main.c
@@ -8,6 +8,10 @@
 # include <event2/thread.h>
 #endif
 
+#ifdef HAVE_SYSEXITS_H
+# include <sysexits.h>
+#endif
+
 #include "main.h"
 #include "ntp_libopts.h"
 #include "kod_management.h"
--- contrib/ntp/sntp/networking.c.orig
+++ contrib/ntp/sntp/networking.c
@@ -26,7 +26,7 @@
 	cc = sendto(rsock, (void *)pkt, len, 0, &dest->sa, 
 		    SOCKLEN(dest));
 	if (cc == SOCKET_ERROR) {
-		msyslog(LOG_ERR, "Send to %s failed, %m",
+		msyslog(LOG_ERR, "sendpkt: sendto(%s) failed: %m",
 			sptoa(dest));
 		return FALSE;
 	}
--- contrib/ntp/sntp/scm-rev.orig
+++ contrib/ntp/sntp/scm-rev
@@ -1 +1 @@
-1.3847
+1.3728
--- contrib/ntp/sntp/sntp-opts.c.orig
+++ contrib/ntp/sntp/sntp-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:55:45 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:39:59 PM by AutoGen 5.18.5
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The sntp program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -70,8 +70,8 @@
  *  static const strings for sntp options
  */
 static char const sntp_opt_strs[2566] =
-/*     0 */ "sntp 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "sntp 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -156,7 +156,7 @@
 /*  2313 */ "LOAD_OPTS\0"
 /*  2323 */ "no-load-opts\0"
 /*  2336 */ "SNTP\0"
-/*  2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p13\n"
+/*  2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
             "\t\t[ hostname-or-IP ...]\n\0"
 /*  2501 */ "$HOME\0"
@@ -164,7 +164,7 @@
 /*  2509 */ ".ntprc\0"
 /*  2516 */ "http://bugs.ntp.org, bugs@ntp.org\0"
 /*  2550 */ "\n\0"
-/*  2552 */ "sntp 4.2.8p13";
+/*  2552 */ "sntp 4.2.8p14";
 
 /**
  *  ipv4 option description with
@@ -1176,8 +1176,8 @@
      translate option names.
    */
   /* referenced via sntpOptions.pzCopyright */
-  puts(_("sntp 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("sntp 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -1266,7 +1266,7 @@
   puts(_("load options from a config file"));
 
   /* referenced via sntpOptions.pzUsageTitle */
-  puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p13\n\
+  puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
 \t\t[ hostname-or-IP ...]\n"));
 
@@ -1274,7 +1274,7 @@
   puts(_("\n"));
 
   /* referenced via sntpOptions.pzFullVersion */
-  puts(_("sntp 4.2.8p13"));
+  puts(_("sntp 4.2.8p14"));
 
   /* referenced via sntpOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/sntp/sntp-opts.h.orig
+++ contrib/ntp/sntp/sntp-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:55:45 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:39:58 PM by AutoGen 5.18.5
  *  From the definitions    sntp-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The sntp program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -91,9 +91,9 @@
 /** count of all options for sntp */
 #define OPTION_CT    23
 /** sntp version */
-#define SNTP_VERSION       "4.2.8p13"
+#define SNTP_VERSION       "4.2.8p14"
 /** Full sntp version text */
-#define SNTP_FULL_VERSION  "sntp 4.2.8p13"
+#define SNTP_FULL_VERSION  "sntp 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/sntp/sntp.1sntpman.orig
+++ contrib/ntp/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH sntp 1sntpman "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH sntp 1sntpman "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:55:51 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:40:04 PM by AutoGen 5.18.5
 .\" From the definitions sntp-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -353,7 +353,7 @@
 .NOP  "Dave Hart" 
 .br
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/sntp/sntp.1sntpmdoc.orig
+++ contrib/ntp/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt SNTP 1sntpmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:55:48 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:01 PM by AutoGen 5.18.5
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -308,7 +308,7 @@
 .An "Harlan Stenn"
 .An "Dave Hart"
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/sntp/sntp.html.orig
+++ contrib/ntp/sntp/sntp.html
@@ -64,7 +64,7 @@
 clock.  Run as root, it can correct the system clock to this offset as
 well.  It can be run as an interactive command or from a cron job.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>sntp</code>.
+<p>This document applies to version 4.2.8p14 of <code>sntp</code>.
 </p>
 <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
 IETF specification.
@@ -243,7 +243,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p13
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p14
 Usage:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
                 [ hostname-or-IP ...]
   Flg Arg Option-Name    Description
--- contrib/ntp/sntp/sntp.man.in.orig
+++ contrib/ntp/sntp/sntp.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH sntp @SNTP_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
+.TH sntp @SNTP_MS@ "03 Mar 2020" "4.2.8p14" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:55:51 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:40:04 PM by AutoGen 5.18.5
 .\" From the definitions sntp-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -353,7 +353,7 @@
 .NOP  "Dave Hart" 
 .br
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/sntp/sntp.mdoc.in.orig
+++ contrib/ntp/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt SNTP @SNTP_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (sntp-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:55:48 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:40:01 PM by AutoGen 5.18.5
 .\"  From the definitions    sntp-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -308,7 +308,7 @@
 .An "Harlan Stenn"
 .An "Dave Hart"
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh "BUGS"
 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
--- contrib/ntp/sntp/tests/run-crypto.c.orig
+++ contrib/ntp/sntp/tests/run-crypto.c
@@ -43,7 +43,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-keyFile.c.orig
+++ contrib/ntp/sntp/tests/run-keyFile.c
@@ -41,7 +41,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-kodDatabase.c.orig
+++ contrib/ntp/sntp/tests/run-kodDatabase.c
@@ -44,7 +44,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-kodFile.c.orig
+++ contrib/ntp/sntp/tests/run-kodFile.c
@@ -42,7 +42,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-networking.c.orig
+++ contrib/ntp/sntp/tests/run-networking.c
@@ -34,7 +34,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-packetHandling.c.orig
+++ contrib/ntp/sntp/tests/run-packetHandling.c
@@ -50,7 +50,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-packetProcessing.c.orig
+++ contrib/ntp/sntp/tests/run-packetProcessing.c
@@ -54,7 +54,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-t-log.c.orig
+++ contrib/ntp/sntp/tests/run-t-log.c
@@ -36,7 +36,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/run-utilities.c.orig
+++ contrib/ntp/sntp/tests/run-utilities.c
@@ -44,7 +44,9 @@
 //=======Suite Setup=====
 static void suite_setup(void)
 {
+extern int change_iobufs(int);
 extern int change_logfile(const char*, int);
+change_iobufs(1);
 change_logfile("stderr", 0);
 }
 
--- contrib/ntp/sntp/tests/testconf.yml.orig
+++ contrib/ntp/sntp/tests/testconf.yml
@@ -4,6 +4,8 @@
 --- 
 :unity:
   :suite_setup:
+    - extern int change_iobufs(int);
     - extern int change_logfile(const char*, int);
+    - change_iobufs(1);
     - change_logfile("stderr", 0);
 
--- contrib/ntp/sntp/version.c.orig
+++ contrib/ntp/sntp/version.c
@@ -2,4 +2,4 @@
  * version file for sntp
  */
 #include <config.h>
-const char * Version = "sntp 4.2.8p13@1.3847-o Thu Feb 21 01:04:54 UTC 2019 (1)";
+const char * Version = "sntp 4.2.8p14@1.3728-o Wed Mar  4 01:42:35 UTC 2020 (8)";
--- contrib/ntp/util/invoke-ntp-keygen.texi.orig
+++ contrib/ntp/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
 #
 # EDIT THIS FILE WITH CAUTION  (invoke-ntp-keygen.texi)
 #
-# It has been AutoGen-ed  February 20, 2019 at 09:57:13 AM by AutoGen 5.18.5
+# It has been AutoGen-ed  March  3, 2020 at 05:41:32 PM by AutoGen 5.18.5
 # From the definitions    ntp-keygen-opts.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -1056,7 +1056,7 @@
 
 @exampleindent 0
 @example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p13
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p14
 Usage:  ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -b Num imbits         identity modulus bits
--- contrib/ntp/util/ntp-keygen-opts.c.orig
+++ contrib/ntp/util/ntp-keygen-opts.c
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:57:09 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:28 PM by AutoGen 5.18.5
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntp-keygen program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -72,8 +72,8 @@
  *  static const strings for ntp-keygen options
  */
 static char const ntp_keygen_opt_strs[2442] =
-/*     0 */ "ntp-keygen (ntp) 4.2.8p13\n"
-            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+/*     0 */ "ntp-keygen (ntp) 4.2.8p14\n"
+            "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the NTP License, copies of which\n"
             "can be seen at:\n"
@@ -165,7 +165,7 @@
 /*  2223 */ "no-load-opts\0"
 /*  2236 */ "no\0"
 /*  2239 */ "NTP_KEYGEN\0"
-/*  2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p13\n"
+/*  2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p14\n"
             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
 /*  2365 */ "$HOME\0"
 /*  2371 */ ".\0"
@@ -172,7 +172,7 @@
 /*  2373 */ ".ntprc\0"
 /*  2380 */ "http://bugs.ntp.org, bugs@ntp.org\0"
 /*  2414 */ "\n\0"
-/*  2416 */ "ntp-keygen (ntp) 4.2.8p13";
+/*  2416 */ "ntp-keygen (ntp) 4.2.8p14";
 
 /**
  *  imbits option description:
@@ -1310,8 +1310,8 @@
      translate option names.
    */
   /* referenced via ntp_keygenOptions.pzCopyright */
-  puts(_("ntp-keygen (ntp) 4.2.8p13\n\
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+  puts(_("ntp-keygen (ntp) 4.2.8p14\n\
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the NTP License, copies of which\n\
 can be seen at:\n"));
@@ -1409,7 +1409,7 @@
   puts(_("load options from a config file"));
 
   /* referenced via ntp_keygenOptions.pzUsageTitle */
-  puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p13\n\
+  puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p14\n\
 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
 
   /* referenced via ntp_keygenOptions.pzExplain */
@@ -1416,7 +1416,7 @@
   puts(_("\n"));
 
   /* referenced via ntp_keygenOptions.pzFullVersion */
-  puts(_("ntp-keygen (ntp) 4.2.8p13"));
+  puts(_("ntp-keygen (ntp) 4.2.8p14"));
 
   /* referenced via ntp_keygenOptions.pzFullUsage */
   puts(_("<<<NOT-FOUND>>>"));
--- contrib/ntp/util/ntp-keygen-opts.h.orig
+++ contrib/ntp/util/ntp-keygen-opts.h
@@ -1,7 +1,7 @@
 /*
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *
- *  It has been AutoGen-ed  February 20, 2019 at 09:57:09 AM by AutoGen 5.18.5
+ *  It has been AutoGen-ed  March  3, 2020 at 05:41:28 PM by AutoGen 5.18.5
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -18,7 +18,7 @@
  * The ntp-keygen program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
+ *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the NTP License, copies of which
  *  can be seen at:
@@ -94,9 +94,9 @@
 /** count of all options for ntp-keygen */
 #define OPTION_CT    26
 /** ntp-keygen version */
-#define NTP_KEYGEN_VERSION       "4.2.8p13"
+#define NTP_KEYGEN_VERSION       "4.2.8p14"
 /** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) 4.2.8p13"
+#define NTP_KEYGEN_FULL_VERSION  "ntp-keygen (ntp) 4.2.8p14"
 
 /**
  *  Interface defines for all options.  Replace "n" with the UPPER_CASED
--- contrib/ntp/util/ntp-keygen.1ntp-keygenman.orig
+++ contrib/ntp/util/ntp-keygen.1ntp-keygenman
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:14 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:34 PM by AutoGen 5.18.5
 .\" From the definitions ntp-keygen-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -1351,7 +1351,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 It can take quite a while to generate some cryptographic values.
--- contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc.orig
+++ contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:11 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:30 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -1208,7 +1208,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 It can take quite a while to generate some cryptographic values.
--- contrib/ntp/util/ntp-keygen.html.orig
+++ contrib/ntp/util/ntp-keygen.html
@@ -95,7 +95,7 @@
 printable ASCII format so they can be embedded as MIME attachments in
 mail to other sites.
 </p>
-<p>This document applies to version 4.2.8p13 of <code>ntp-keygen</code>.
+<p>This document applies to version 4.2.8p14 of <code>ntp-keygen</code>.
 </p>
 <table class="menu" border="0" cellspacing="0">
 <tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
@@ -1405,7 +1405,7 @@
 with a status code of 0.
 </p>
 <div class="example">
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p12
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p13
 Usage:  ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
   Flg Arg Option-Name    Description
    -b Num imbits         identity modulus bits
--- contrib/ntp/util/ntp-keygen.man.in.orig
+++ contrib/ntp/util/ntp-keygen.man.in
@@ -10,11 +10,11 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "03 Mar 2020" "ntp (4.2.8p14)" "User Commands"
 .\"
 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
 .\"
-.\" It has been AutoGen-ed February 20, 2019 at 09:57:14 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 3, 2020 at 05:41:34 PM by AutoGen 5.18.5
 .\" From the definitions ntp-keygen-opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
@@ -1351,7 +1351,7 @@
 .SH "AUTHORS"
 The University of Delaware and Network Time Foundation
 .SH "COPYRIGHT"
-Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .SH BUGS
 It can take quite a while to generate some cryptographic values.
--- contrib/ntp/util/ntp-keygen.mdoc.in.orig
+++ contrib/ntp/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 20 2019
+.Dd March 3 2020
 .Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
 .Os
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.mdoc)
 .\"
-.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:11 AM by AutoGen 5.18.5
+.\"  It has been AutoGen-ed  March  3, 2020 at 05:41:30 PM by AutoGen 5.18.5
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agmdoc-cmd.tpl
 .Sh NAME
@@ -1208,7 +1208,7 @@
 .Sh "AUTHORS"
 The University of Delaware and Network Time Foundation
 .Sh "COPYRIGHT"
-Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
 This program is released under the terms of the NTP license, <http://ntp.org/license>.
 .Sh BUGS
 It can take quite a while to generate some cryptographic values.
--- contrib/ntp/util/ntptime.c.orig
+++ contrib/ntp/util/ntptime.c
@@ -53,9 +53,14 @@
  * a struct timeval to the microsecond (more or less).  This keeps
  * things neat.
  */
-#define	TS_MASK		0xfffff000	/* mask to usec, for time stamps */
-#define	TS_ROUNDBIT	0x00000800	/* round at this bit */
+#define	TS_MASK_US	0xfffff000	/* mask to usec, for time stamps */
+#define	TS_ROUNDBIT_US	0x00000800	/* round at this bit */
+#define	TS_DIGITS_US	6
 
+#define	TS_MASK_NS	0xfffffffc	/* 1/2^30, for nsec */
+#define	TS_ROUNDBIT_NS	0x00000002
+#define	TS_DIGITS_NS	9
+
 /*
  * Function prototypes
  */
@@ -93,11 +98,12 @@
 	struct timex ntx, _ntx;
 	int	times[20] = { 0 };
 	double ftemp, gtemp, htemp;
+	double nscale = 1.0;			/* assume usec scale for now */
 	long time_frac;				/* ntv.time.tv_frac_sec (us/ns) */
 	l_fp ts;
-	volatile unsigned ts_mask = TS_MASK;		/* defaults to 20 bits (us) */
-	volatile unsigned ts_roundbit = TS_ROUNDBIT;	/* defaults to 20 bits (us) */
-	volatile int fdigits = 6;			/* fractional digits for us */
+	volatile unsigned ts_mask = TS_MASK_US;		/* defaults to 20 bits (us) */
+	volatile unsigned ts_roundbit = TS_ROUNDBIT_US;	/* defaults to 20 bits (us) */
+	volatile int fdigits = TS_DIGITS_US;		/* fractional digits for us */
 	size_t c;
 	int ch;
 	int errflg	= 0;
@@ -118,13 +124,11 @@
 			ntx.modes |= MOD_NANO;
 			break;
 #endif
-#ifdef NTP_API
-# if NTP_API > 3
+#if defined(NTP_API) && NTP_API > 3
 		case 'T':
 			ntx.modes = MOD_TAI;
 			ntx.constant = atoi(ntp_optarg);
 			break;
-# endif
 #endif
 		case 'c':
 			cost++;
@@ -226,14 +230,13 @@
 	 */
 	pll_control = 1;
 #ifdef SIGSYS
-	if (sigsetjmp(env, 1) == 0) {
+	if (sigsetjmp(env, 1) == 0)
 #endif
+	{
 		status = syscall(BADCALL, &ntv); /* dummy parameter */
 		if ((status < 0) && (errno == ENOSYS))
 			--pll_control;
-#ifdef SIGSYS
 	}
-#endif
 	if (pll_control)
 	    printf("sigaction() failed to catch an invalid syscall\n");
 #endif /* BADCALL */
@@ -240,8 +243,9 @@
 
 	if (cost) {
 #ifdef SIGSYS
-		if (sigsetjmp(env, 1) == 0) {
+		if (sigsetjmp(env, 1) == 0)
 #endif
+		{
 			for (c = 0; c < COUNTOF(times); c++) {
 				status = ntp_gettime(&ntv);
 				if ((status < 0) && (errno == ENOSYS))
@@ -250,9 +254,7 @@
 					break;
 				times[c] = ntv.time.tv_frac_sec;
 			}
-#ifdef SIGSYS
 		}
-#endif
 		if (pll_control >= 0) {
 			printf("[ us %06d:", times[0]);
 			for (c = 1; c < COUNTOF(times); c++)
@@ -261,25 +263,23 @@
 		}
 	}
 #ifdef SIGSYS
-	if (sigsetjmp(env, 1) == 0) {
+	if (sigsetjmp(env, 1) == 0)
 #endif
+	{
 		status = ntp_gettime(&ntv);
 		if ((status < 0) && (errno == ENOSYS))
 			--pll_control;
-#ifdef SIGSYS
 	}
-#endif
 	_ntx.modes = 0;				/* Ensure nothing is set */
 #ifdef SIGSYS
-	if (sigsetjmp(env, 1) == 0) {
+	if (sigsetjmp(env, 1) == 0)
 #endif
+	{
 		status = ntp_adjtime(&_ntx);
 		if ((status < 0) && (errno == ENOSYS))
 			--pll_control;
 		flash = _ntx.status;
-#ifdef SIGSYS
 	}
-#endif
 	if (pll_control < 0) {
 		printf("NTP user interface routines are not configured in this kernel.\n");
 		goto lexit;
@@ -298,9 +298,9 @@
 #ifdef STA_NANO
 		if (flash & STA_NANO) {
 			ntv.time.tv_frac_sec /= 1000;
-			ts_mask = 0xfffffffc;	/* 1/2^30 */
-			ts_roundbit = 0x00000002;
-			fdigits = 9;
+			ts_mask = TS_MASK_NS;
+			ts_roundbit = TS_ROUNDBIT_NS;
+			fdigits = TS_DIGITS_NS;
 		}
 #endif
 		tv.tv_sec = ntv.time.tv_sec;
@@ -311,8 +311,8 @@
 		ts.l_uf &= ts_mask;
 		printf("  time %s, (.%0*d),\n",
 		       prettydate(&ts), fdigits, (int)time_frac);
-		printf("  maximum error %lu us, estimated error %lu us",
-		       (u_long)ntv.maxerror, (u_long)ntv.esterror);
+		printf("  maximum error %ld us, estimated error %ld us",
+		       ntv.maxerror, ntv.esterror);
 		if (rawtime)
 			printf("  ntptime=%x.%x unixtime=%x.%0*d %s",
 			       (u_int)ts.l_ui, (u_int)ts.l_uf,
@@ -319,7 +319,7 @@
 			       (int)ntv.time.tv_sec, fdigits,
 			       (int)time_frac,
 			       ctime((time_t *)&ntv.time.tv_sec));
-#if NTP_API > 3
+#if defined(NTP_API) && NTP_API > 3
 		printf(", TAI offset %ld\n", (long)ntv.tai);
 #else
 		printf("\n");
@@ -335,38 +335,33 @@
 		printf("ntp_adjtime() returns code %d (%s)\n",
 		     status, timex_state(status));
 		printf("  modes %s,\n", sprintb(ntx.modes, TIMEX_MOD_BITS));
-		ftemp = (double)ntx.offset;
 #ifdef STA_NANO
 		if (flash & STA_NANO)
-			ftemp /= 1000.0;
+			nscale = 1e-3;
 #endif
+		ftemp = (double)ntx.offset * nscale;
 		printf("  offset %.3f", ftemp);
 		ftemp = (double)ntx.freq / SCALE_FREQ;
 		printf(" us, frequency %.3f ppm, interval %d s,\n",
-		     ftemp, 1 << ntx.shift);
-		printf("  maximum error %lu us, estimated error %lu us,\n",
-		     (u_long)ntx.maxerror, (u_long)ntx.esterror);
+		       ftemp, 1 << ntx.shift);
+		printf("  maximum error %ld us, estimated error %ld us,\n",
+		     ntx.maxerror, ntx.esterror);
 		printf("  status %s,\n", sprintb((u_int)ntx.status, TIMEX_STA_BITS));
 		ftemp = (double)ntx.tolerance / SCALE_FREQ;
-		gtemp = (double)ntx.precision;
+		gtemp = (double)ntx.precision * nscale;
 		printf(
-		    "  time constant %lu, precision %.3f us, tolerance %.0f ppm,\n",
-		    (u_long)ntx.constant, gtemp, ftemp);
+			"  time constant %lu, precision %.3f us, tolerance %.0f ppm,\n",
+			(u_long)ntx.constant, gtemp, ftemp);
 		if (ntx.shift == 0)
 			exit(0);
 		ftemp = (double)ntx.ppsfreq / SCALE_FREQ;
 		gtemp = (double)ntx.stabil / SCALE_FREQ;
-		htemp = (double)ntx.jitter;
-#ifdef STA_NANO
-		if (flash & STA_NANO)
-			htemp /= 1000.0;
-#endif
-		printf(
-		    "  pps frequency %.3f ppm, stability %.3f ppm, jitter %.3f us,\n",
-		    ftemp, gtemp, htemp);
+		htemp = (double)ntx.jitter * nscale;
+		printf("  pps frequency %.3f ppm, stability %.3f ppm, jitter %.3f us,\n",
+		       ftemp, gtemp, htemp);
 		printf("  intervals %lu, jitter exceeded %lu, stability exceeded %lu, errors %lu.\n",
-		    (u_long)ntx.calcnt, (u_long)ntx.jitcnt,
-		    (u_long)ntx.stbcnt, (u_long)ntx.errcnt);
+		       (u_long)ntx.calcnt, (u_long)ntx.jitcnt,
+		       (u_long)ntx.stbcnt, (u_long)ntx.errcnt);
 		return 0;
 	}
 
--- usr.sbin/ntp/config.h.orig
+++ usr.sbin/ntp/config.h
@@ -1474,7 +1474,7 @@
 #define PACKAGE_URL "http://www.ntp.org./"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "4.2.8p13"
+#define PACKAGE_VERSION "4.2.8p14"
 
 /* data dir */
 #define PERLLIBDIR "/usr/share/ntp/lib"
--- usr.sbin/ntp/libntp/Makefile.orig
+++ usr.sbin/ntp/libntp/Makefile
@@ -21,6 +21,7 @@
 	libssl_compat.c \
 	machines.c	mktime.c	modetoa.c \
 	mstolfp.c	msyslog.c	netof.c		ntp_calendar.c \
+	ntp_calgps.c \
 	ntp_crypto_rnd.c		ntp_intres.c	ntp_libopts.c \
 	ntp_lineedit.c	ntp_random.c	ntp_rfc2553.c	ntp_worker.c \
 	numtoa.c	numtohost.c	octtoint.c	prettydate.c \
@@ -27,8 +28,10 @@
 	recvbuff.c	refidsmear.c	\
 	refnumtoa.c	snprintf.c	socket.c \
 	socktoa.c	socktohost.c	ssl_init.c	statestr.c \
-	strdup.c	strl_obsd.c	syssignal.c	timetoa.c \
-	timevalops.c	uglydate.c	vint64ops.c	work_fork.c \
+	strdup.c	strl_obsd.c	syssignal.c	timespecops.c \
+	timetoa.c \
+	timevalops.c	timexsup.c	\
+	uglydate.c	vint64ops.c	work_fork.c \
 	work_thread.c	xsbprintf.c	ymd2yd.c
 
 ISC_PTHREADS_SRCS= condition.c \
